sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

Fix for Windows: don't modify process.env #112

Closed thorn0 closed 7 years ago

thorn0 commented 7 years ago

I used grunt-shell with watch, and every time it was triggered, PATH was getting bigger and bigger. For some reason (which I didn't investigate), this was happening only on Windows. I added a test that was failing on Windows, but worked on Ubuntu.

thorn0 commented 7 years ago

Look closer at that statement. The passed opts.env isn't copied there.

sindresorhus commented 7 years ago

Ah, good eye. I've fixed it in npm-run-path: https://github.com/sindresorhus/npm-run-path/commit/c195bdc786ca1d1b303a3e9013da84a9dc4eaad2

Can you remove the fix and only keep the test here?

thorn0 commented 7 years ago

done

thorn0 commented 7 years ago

Turns out it happened on Linux too. I just used the wrong command to test it (set vs printenv).

sindresorhus commented 7 years ago

Thanks :)