Closed lipkau closed 6 years ago
When Import-Configuration tries to load the config from Machine scope, it fails with:
New-Item : Access to the path '/etc/xdg/powershell/AtlassianPS' is denied. At /Users/travis/.local/share/powershell/Modules/Configuration/1.2.0/Configuration.psm1:209 char:21 + $null = New-Item $PathRoot -Type Directory -Force + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (/etc/xdg/powershell/AtlassianPS:String) [New-Item], UnauthorizedAccessException + FullyQualifiedErrorId : CreateDirectoryUnauthorizedAccessError,Microsoft.PowerShell.Commands.NewItemCommand
See logs at: https://travis-ci.org/AtlassianPS/BitbucketPS/jobs/335077778#L307
On Linux and OSX, the fallback path /etc/xdg/powershell needs sudo permissions. https://github.com/PoshCode/Configuration/blob/master/Source/Configuration.psm1#L209
/etc/xdg/powershell
sudo
Need to change Configuration module to not create folders when reading values, only when explicitly trying to write.
Description
When Import-Configuration tries to load the config from Machine scope, it fails with:
See logs at: https://travis-ci.org/AtlassianPS/BitbucketPS/jobs/335077778#L307
Details
On Linux and OSX, the fallback path
/etc/xdg/powershell
needssudo
permissions. https://github.com/PoshCode/Configuration/blob/master/Source/Configuration.psm1#L209