PowerShell-Snap
PowerShell-Snap copied to clipboard
Unable to create profiles for "AllUsers"
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest version
- [X] Search the existing issues.
Steps to reproduce
I am trying to create a $PROFILE.AllUsersAllHosts profile. It is not possible to create the profile because $PSHOME points to /snap/powershell/264/opt/powershell, which is read-only and therefore $PROFILE.AllUsersAllHosts points to /snap/powershell/264/opt/powershell/profile.ps1 instead of /opt/microsoft/powershell/7/profile.ps1, which is the location if powershell is installed with apt. For Ubuntu 24.04 the apt version is not yet available, it needs package libicu72 (ubuntu 22.04, jammy) while Ubuntu 24.04 uses libicu74 (noble) and libicu72 is not available anymore.
It seems to me that if the snap gets updated to version 265, the profile would be lost, because then $PSHOME would point to /snap/powershell/264/opt/powershell
Expected behavior
It should be possible to create the profiles $PROFILE.AllUsersAllHosts and $PROFILE.AllUsersCurrentHost
Actual behavior
PS> sudo cp ./Projects/PowerShell/profile.allusersallhosts.ps1 $PROFILE.AllUsersAllHosts
cp: cannot create regular file '/snap/powershell/264/opt/powershell/profile.ps1': Read-only file system
Error details
No response
Environment data
PS> $PSVersionTable
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Ubuntu Noble Numbat (development branch)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
264
Visuals
No response