Title: Pipeline Chain Operator not working consistently · Issue #10835 · PowerShell/PowerShell · GitHub
Open Graph Title: Pipeline Chain Operator not working consistently · Issue #10835 · PowerShell/PowerShell
X Title: Pipeline Chain Operator not working consistently · Issue #10835 · PowerShell/PowerShell
Description: It seems that after the first use of the pipeline chain operator, there is an issue where $? is cached so subsequent use exhibits different behavior. If you run a successful get-item ., then it works correctly again. Steps to reproduce "...
Open Graph Description: It seems that after the first use of the pipeline chain operator, there is an issue where $? is cached so subsequent use exhibits different behavior. If you run a successful get-item ., then it wor...
X Description: It seems that after the first use of the pipeline chain operator, there is an issue where $? is cached so subsequent use exhibits different behavior. If you run a successful get-item ., then it wor...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10835
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pipeline Chain Operator not working consistently","articleBody":"It seems that after the first use of the pipeline chain operator, there is an issue where `$?` is cached so subsequent use exhibits different behavior.\r\n\r\nIf you run a successful `get-item .`, then it works correctly again.\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n\"hello\" && get-item foo || \"there\"\r\n\"hello\" || \"there\"\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\nS> \"hello\" && get-item foo || \"there\"\r\nhello\r\nGet-Item: Cannot find path '/Users/steve/repos/PowerShell/foo' because it does not exist.\r\nthere\r\n[30.77ms] /Users/steve/repos/PowerShell [host-vt]\r\nPS> \"hello\" || \"there\"\r\nhello\r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\nPS> \"hello\" && get-item foo || \"there\"\r\nhello\r\nGet-Item: Cannot find path '/Users/steve/repos/PowerShell/foo' because it does not exist.\r\nthere\r\n[30.77ms] /Users/steve/repos/PowerShell [host-vt]\r\nPS> \"hello\" || \"there\"\r\nhello\r\nthere\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-preview.4\r\nPSEdition Core\r\nGitCommitId 7.0.0-preview.4-79-ge1203aa31b095cbffacb01978541fc641c07f770\r\nOS Darwin 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/SteveL-MSFT","@type":"Person","name":"SteveL-MSFT"},"datePublished":"2019-10-18T19:19:58Z","url":"https://github.com/PowerShell/PowerShell/issues/10835"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:60abbb38-9c00-f4b2-d639-619ac2176ad2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9984:323995:1D7C32:27AAFC:6AFD4481 |
| html-safe-nonce | 825318ec4b80b2c5d948c9a4f3075d88e1ab6fb98fdf402d77452d5b32c5ca30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTg0OjMyMzk5NToxRDdDMzI6MjdBQUZDOjZBRkQ0NDgxIiwidmlzaXRvcl9pZCI6IjUzNzk4MTQ1NzU3ODI1NzcyODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fb38a1a752ceeea3660f4cb674607680695a86258d6ea5415a6e71d43620171a |
| hovercard-subject-tag | issue:509266273 |
| 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/10835/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f4fee6ab97603f760df22cd3dc4958d1d15f02a4b1f13d02e1302d022df3f6b8/PowerShell/PowerShell/issues/10835 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f4fee6ab97603f760df22cd3dc4958d1d15f02a4b1f13d02e1302d022df3f6b8/PowerShell/PowerShell/issues/10835 |
| og:image:alt | It seems that after the first use of the pipeline chain operator, there is an issue where $? is cached so subsequent use exhibits different behavior. If you run a successful get-item ., then it wor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SteveL-MSFT |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| 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 | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width