Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Commit

Permalink
fix(env): Removing if clause for windows detection, applying APPDATA …
Browse files Browse the repository at this point in the history
…to all platforms.
  • Loading branch information
NogsMPLS committed Nov 12, 2015
1 parent 125055d commit 847e80f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ function getCommandArgsAndEnvVars(args) {
command = shifted;
break;
}
/* istanbul ignore else */
if (process.platform === 'win32') {
envVars.APPDATA = process.env.APPDATA;
}
envVars.APPDATA = process.env.APPDATA;
}
return [command, commandArgs, envVars];
}
4 changes: 1 addition & 3 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe(`cross-env`, () => {
function testEnvSetting(...envSettings) {
const ret = crossEnv([...envSettings, 'echo', 'hello world']);
const env = {[getPathVar()]: process.env[getPathVar()]};
if (process.platform === 'win32') {
env.APPDATA = process.env.APPDATA;
}
env.APPDATA = process.env.APPDATA;
envSettings.forEach(setting => {
const [prop, val] = setting.split('=');
env[prop] = val;
Expand Down

0 comments on commit 847e80f

Please sign in to comment.