Instructions for many tools from the Linux world suggest setting an environment variable for a single invocation of a command like:
JEKYLL_ENV=production jekyll build
The equivalent in PowerShell is cumbersome:
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:
$env:JEKYLL_ENV="production" jekyll build
Instructions for many tools from the Linux world suggest setting an environment variable for a single invocation of a command like:
The equivalent in PowerShell is cumbersome:
I believe a similar syntax could work in PowerShell: