Title: Unblock-File provides no message if the file is ReadOnly (and thus fails) · Issue #4390 · PowerShell/PowerShell · GitHub
Open Graph Title: Unblock-File provides no message if the file is ReadOnly (and thus fails) · Issue #4390 · PowerShell/PowerShell
X Title: Unblock-File provides no message if the file is ReadOnly (and thus fails) · Issue #4390 · PowerShell/PowerShell
Description: Steps to reproduce Using Pester; $TestPath = "TestDrive:\test.ps1" Set-Content -Path $TestPath -value 'Break' $ZoneIdentifier = { [ZoneTransfer] ZoneId=3 } Set-Content -Path $Testpath -Value $ZoneIdentifier -Stream 'Zone.Identifier' Set-...
Open Graph Description: Steps to reproduce Using Pester; $TestPath = "TestDrive:\test.ps1" Set-Content -Path $TestPath -value 'Break' $ZoneIdentifier = { [ZoneTransfer] ZoneId=3 } Set-Content -Path $Testpath -Value $ZoneI...
X Description: Steps to reproduce Using Pester; $TestPath = "TestDrive:\test.ps1" Set-Content -Path $TestPath -value 'Break' $ZoneIdentifier = { [ZoneTransfer] ZoneId=3 } Set-Content -Path $Test...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4390
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unblock-File provides no message if the file is ReadOnly (and thus fails)","articleBody":"Steps to reproduce\r\n------------------\r\nUsing Pester;\r\n```powershell\r\n $TestPath = \"TestDrive:\\test.ps1\"\r\n Set-Content -Path $TestPath -value 'Break'\r\n $ZoneIdentifier = {\r\n [ZoneTransfer]\r\n ZoneId=3\r\n }\r\n Set-Content -Path $Testpath -Value $ZoneIdentifier -Stream 'Zone.Identifier'\r\n Set-ItemProperty -Path $TestPath -Name IsReadOnly -Value $True\r\n .\\Set-UnblockPS1.ps1 -Path $Testpath\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n- Warning/Error/Message (anything?) that the file has failed to be unblocked. Even a generic error would be useful - for example:\r\n```powershell\r\nWrite-Warning -Message \"Skipping file $($file) as it is ReadOnly\"\r\n```\r\nAlternative would be:\r\n```powershell\r\nWrite-Warning -Message: \"Failed to unblock $($file)\"\r\n```\r\n\r\nActual behavior\r\n---------------\r\nNo output (also not via -Verbose or -Debug) is given.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-beta\r\nPSEdition Core\r\nGitCommitId v6.0.0-beta.4\r\nOS Microsoft Windows 10.0.16232\r\nPlatform Win32NT\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\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 5.1.16232.1000\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 10.0.16232.1000\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n```","author":{"url":"https://github.com/Aprazeth","@type":"Person","name":"Aprazeth"},"datePublished":"2017-07-29T11:54:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4390/PowerShell/issues/4390"}
| 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:6ad2268d-d9a4-3a49-a197-ec919e34f4ad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92E8:3C39A9:60D383F:87DB141:6A573DBA |
| html-safe-nonce | 3a53d09dd897697ef41270f156aa10fc76fda2539f6a48017ff3a78d2f6e0867 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkU4OjNDMzlBOTo2MEQzODNGOjg3REIxNDE6NkE1NzNEQkEiLCJ2aXNpdG9yX2lkIjoiNjAxODk2NDMwODgyNzMzNDk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ecf5ad5c7655a36598777c9e1b282816a3d0026b2712938782fe3d17ea24b6cc |
| hovercard-subject-tag | issue:246517401 |
| 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/4390/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da6af30701df6d3f40b3156c583c03a6d71a0f45e3291bcbb10d8eef639432b2/PowerShell/PowerShell/issues/4390 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da6af30701df6d3f40b3156c583c03a6d71a0f45e3291bcbb10d8eef639432b2/PowerShell/PowerShell/issues/4390 |
| og:image:alt | Steps to reproduce Using Pester; $TestPath = "TestDrive:\test.ps1" Set-Content -Path $TestPath -value 'Break' $ZoneIdentifier = { [ZoneTransfer] ZoneId=3 } Set-Content -Path $Testpath -Value $ZoneI... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Aprazeth |
| 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