You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove-Item on MacOS fails to use credentials of current user #9519
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.
Remove-Item : You do not have sufficient access rights to perform this operation.
At line:1 char:1
+ Remove-Item ./node_modules/ -Recurse
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (/Users/shayneboyer/\u2026e/node_modules/.bin:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Environment data
Name Value
---- -----
PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Darwin 18.5.0 Darwin Kernel Version 18.5.0: Mon…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
The -force enables removing hidden or read-only files/folders. I believe in this case the .bin is a hidden directory and why we see the error in removing it.
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.
Activity
spboyer commentedon May 2, 2019
Requires
-Forceflag, but probably should not?usepowershell commentedon May 2, 2019
The
-forceenables removing hidden or read-only files/folders. I believe in this case the.binis a hidden directory and why we see the error in removing it.(from the help)
SteveL-MSFT commentedon May 3, 2019
Perhaps we could improve the error message if this is the case that the folder is read-only