Title: Provide simple one-time setting of environment variable · Issue #3316 · PowerShell/PowerShell · GitHub
Open Graph Title: Provide simple one-time setting of environment variable · Issue #3316 · PowerShell/PowerShell
X Title: Provide simple one-time setting of environment variable · Issue #3316 · PowerShell/PowerShell
Description: 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:JEK...
Open Graph Description: 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 i...
X Description: 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 i...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3316
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide simple one-time setting of environment variable","articleBody":"Instructions for many tools from the Linux world suggest setting an environment variable for a single invocation of a command like:\r\n\r\n```bash\r\nJEKYLL_ENV=production jekyll build\r\n```\r\n\r\nThe equivalent in PowerShell is cumbersome:\r\n\r\n```PowerShell\r\ntry {\r\n $oldValue = $env:JEKYLL_ENV\r\n $env:JEKYLL_ENV = \"production\"\r\n jekyll build\r\n} finally {\r\n $env:JEKYLL_ENV = $oldValue\r\n}\r\n```\r\n\r\nI believe a similar syntax could work in PowerShell:\r\n\r\n```PowerShell\r\n$env:JEKYLL_ENV=\"production\" jekyll build\r\n```","author":{"url":"https://github.com/lzybkr","@type":"Person","name":"lzybkr"},"datePublished":"2017-03-13T03:49:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":55},"url":"https://github.com/3316/PowerShell/issues/3316"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8e48784a-0a8f-522c-adb3-24a30de1a4f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E086:2C29DE:FC496F:155380A:6A571104 |
| html-safe-nonce | 858a2d4cf76f0fa8ebd6f55bec63a69ac0f4fb3ba4b1df808b582240b8273d82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDg2OjJDMjlERTpGQzQ5NkY6MTU1MzgwQTo2QTU3MTEwNCIsInZpc2l0b3JfaWQiOiI0ODY2NDc2MzY5NDA3MDU0MDg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4191289aca3221f823fac49d3ef5872cfc48a0e847b35325e804efb383ca715c |
| hovercard-subject-tag | issue:213667015 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3316/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d6f9ace6f5e4491425e71d05d7379dd613a6df1607531e8267bdc08ff1bb142d/PowerShell/PowerShell/issues/3316 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d6f9ace6f5e4491425e71d05d7379dd613a6df1607531e8267bdc08ff1bb142d/PowerShell/PowerShell/issues/3316 |
| og:image:alt | 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 i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lzybkr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2576d1f0198cf1588faf2edf27f1ed120903be10 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width