IssueRaiser

Provide simple one-time setting of environment variable

Instructions for many tools from the Linux world suggest setting an environment variable for a single invocation of a command like: ```bash JEKYLL_ENV=production jekyll build ``` The equivalent in PowerShell is cumbersome: ```PowerShell try { $oldValue = $env:JEKYLL_ENV $env:JEKYLL_ENV = "production" jekyll build } finally { $env:JEKYLL_ENV = $oldValue } ``` I believe a similar syntax could work in PowerShell: ```PowerShell $env:JEKYLL_ENV="production" jekyll build ```

Posted by lzybkr on Mar 13, 2017, 3:49 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Sysadmin)

Provide simple one-time setting of environment variable

lzybkrMar 13, 2017, 3:49 AM

Instructions for many tools from the Linux world suggest setting an environment variable for a single invocation of a command like: ```bash JEKYLL_ENV=production jekyll build ``` The equivalent in PowerShell is cumbersome: ```PowerShell try { $oldValue = $env:JEKYLL_ENV $env:JEKYLL_ENV = "production" jekyll build } finally { $env:JEKYLL_ENV = $oldValue } ``` I believe a similar syntax could work in PowerShell: ```PowerShell $env:JEKYLL_ENV="production" jekyll build ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue