Skip to content

Commit

Permalink
Merge pull request #162 from cycjimmy/fix-npm-install-error
Browse files Browse the repository at this point in the history
fix: fix installation error for npm-audit
  • Loading branch information
cycjimmy authored Mar 30, 2023
2 parents f044c7a + 86a0e59 commit d1d5984
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/installSpecifyingVersionSemantic.task.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = async () => {
? `@${semantic_version}`
: '';

const {stdout, stderr} = await exec(`npm install semantic-release${versionSuffix} --silent`, {
const {stdout, stderr} = await exec(`npm install semantic-release${versionSuffix} --no-audit --silent`, {
cwd: path.resolve(__dirname, '..')
});
core.debug(stdout);
Expand Down
4 changes: 2 additions & 2 deletions src/preInstall.task.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ module.exports = async extras => {
}

const _extras = extras.replace(/['"]/g, '').replace(/[\n\r]/g, ' ');
const silentFlag = process.env.RUNNER_DEBUG == '1' ? '' : '--silent';
const silentFlag = process.env.RUNNER_DEBUG === '1' ? '' : '--silent';

const { stdout, stderr } = await exec(`npm install ${_extras} ${silentFlag}`, {
const { stdout, stderr } = await exec(`npm install ${_extras} --no-audit ${silentFlag}`, {
cwd: path.resolve(__dirname, '..')
});
core.debug(stdout);
Expand Down

0 comments on commit d1d5984

Please sign in to comment.