Skip to content

Commit

Permalink
Log exec fails as info as they aren't necessarily error
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHatch committed Sep 5, 2020
1 parent 987b40a commit e7dede1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,10 @@ const cmd = async (command, ...args) => {
};

await exec.exec(command, args, options)
.catch(err => { core.warning(`${command} ${args.join(' ')} failed: ${err}`); });
.catch(err => { core.info(`The command '${command} ${args.join(' ')}' failed: ${err}`); });

if (errors !== '') {
core.warning(errors);
core.info(`stderr: ${errors}`);
}

return output;
Expand Down Expand Up @@ -994,6 +994,10 @@ const setOutput = (major, minor, patch, increment, changed, branch, namespace) =

const repository = process.env.GITHUB_REPOSITORY;

if (!changed) {
core.info('No changes detected for this commit');
}

core.info(`Version is ${major}.${minor}.${patch}+${increment}`);
if (repository !== undefined && !namespace) {
core.info(`To create a release for this version, go to https://github.com/${repository}/releases/new?tag=${tag}&target=${branch.split('/').reverse()[0]}`);
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const cmd = async (command, ...args) => {
};

await exec.exec(command, args, options)
.catch(err => { core.warning(`${command} ${args.join(' ')} failed: ${err}`); });
.catch(err => { core.info(`The command '${command} ${args.join(' ')}' failed: ${err}`); });

if (errors !== '') {
core.warning(errors);
core.info(`stderr: ${errors}`);
}

return output;
Expand Down

0 comments on commit e7dede1

Please sign in to comment.