Title: ErrorAction for Test-Path throw an NullReferenceException · Issue #11692 · PowerShell/PowerShell · GitHub
Open Graph Title: ErrorAction for Test-Path throw an NullReferenceException · Issue #11692 · PowerShell/PowerShell
X Title: ErrorAction for Test-Path throw an NullReferenceException · Issue #11692 · PowerShell/PowerShell
Description: Steps to reproduce #new PS session # The variable 'Stop' not exist Test-Path .\File.ps1 -ErrorAction $Stop Expected behavior message = Invalid value ? Actual behavior Test-Path: Cannot bind parameter 'ErrorAction' to the target. Exceptio...
Open Graph Description: Steps to reproduce #new PS session # The variable 'Stop' not exist Test-Path .\File.ps1 -ErrorAction $Stop Expected behavior message = Invalid value ? Actual behavior Test-Path: Cannot bind paramet...
X Description: Steps to reproduce #new PS session # The variable 'Stop' not exist Test-Path .\File.ps1 -ErrorAction $Stop Expected behavior message = Invalid value ? Actual behavior Test-Path: Cannot bind...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ErrorAction for Test-Path throw an NullReferenceException","articleBody":"# Steps to reproduce\r\n\r\n```powershell\r\n#new PS session\r\n# The variable 'Stop' not exist\r\n\r\nTest-Path .\\File.ps1 -ErrorAction $Stop\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\nmessage = Invalid value ?\r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\nTest-Path: Cannot bind parameter 'ErrorAction' to the target.\r\nException setting \"ErrorAction\": \"Object reference not set to an instance of an object.\"\r\n\r\n```\r\n\r\n# Environment data\r\n```none\r\n```Powershell\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-rc.2\r\nPSEdition Core\r\nGitCommitId 7.0.0-rc.2\r\nOS Microsoft Windows 10.0.18362\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.0, 6.1.0, 6.2.0, 7.0.0-rc.2}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\nSame issue with Windows PowerShell 5.1.","author":{"url":"https://github.com/LaurentDardenne","@type":"Person","name":"LaurentDardenne"},"datePublished":"2020-01-27T18:02:10Z","url":"https://github.com/PowerShell/PowerShell/issues/11692"}
| 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:63638e16-64a7-1b46-813f-35bc028285b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFA8:23EA3F:1DB001:289841:6AFD5051 |
| html-safe-nonce | a4daf14faebdef00cdb0d01984bafef186fd6eb84feee6a376a16056b942bf28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkE4OjIzRUEzRjoxREIwMDE6Mjg5ODQxOjZBRkQ1MDUxIiwidmlzaXRvcl9pZCI6IjkyMTAwOTY5MDQ2MjMxODE5MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6772a9ed7df9c2ed9fc82e2dca401b2343e7f3b93dd0f95f9ed8713d028d952 |
| hovercard-subject-tag | issue:555739984 |
| 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/11692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aec03c96f12fddcd190f0c417676680c134ae8957cb4bb1b0675870550938bd3/PowerShell/PowerShell/issues/11692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aec03c96f12fddcd190f0c417676680c134ae8957cb4bb1b0675870550938bd3/PowerShell/PowerShell/issues/11692 |
| og:image:alt | Steps to reproduce #new PS session # The variable 'Stop' not exist Test-Path .\File.ps1 -ErrorAction $Stop Expected behavior message = Invalid value ? Actual behavior Test-Path: Cannot bind paramet... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LaurentDardenne |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width