Skip to content

Commit

Permalink
fix: remove any npm_* env variables before running other commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ZauberNerd committed Feb 2, 2022
1 parent 0a5d2d9 commit 4ca30c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import {
const isDebug = process.env.DEBUG && process.env.DEBUG.includes('canarist');
const debug = isDebug ? createDebug('canarist') : undefined;

for (const key of Object.keys(process.env)) {
if (key.startsWith('npm_')) {
delete process.env[key];
}
}

const minimistConfig: Opts = {
alias: {
help: ['h'],
Expand Down

0 comments on commit 4ca30c4

Please sign in to comment.