Skip to content

Commit

Permalink
fix(npm): ignore env unset errors and always execute "whoami" and "pu…
Browse files Browse the repository at this point in the history
…blish"
  • Loading branch information
Pavel910 committed May 28, 2018
1 parent 6c99c4e commit d8a0e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/npm/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default (config = {}) => {
// We need to unset the `npm_` env variables to make sure local `.npmrc` is being read.
// This is required when running scripts with yarn: https://github.com/yarnpkg/yarn/issues/4475
const shell = await execa.shell(
`unset $(env | awk -F= '$1 ~ /^npm_/ {print $1}') && ${command}`
`unset $(env | awk -F= '$1 ~ /^npm_/ {print $1}') & ${command}`
);
logger.log(shell.stdout);
pkg.npmPublish = {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/npm/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default (config = {}) => {
// We need to unset the `npm_` env variables to make sure local `.npmrc` is being read.
// This is required when running scripts with yarn: https://github.com/yarnpkg/yarn/issues/4475
await execa.shell(
`unset $(env | awk -F= '$1 ~ /^npm_/ {print $1}') && npm whoami --registry ${registry}`
`unset $(env | awk -F= '$1 ~ /^npm_/ {print $1}') & npm whoami --registry ${registry}`
);
next();
} catch (err) {
Expand Down

0 comments on commit d8a0e33

Please sign in to comment.