Closed DonPwrShellHunt closed 1 week ago
Similar problem with newly released powershell-7.4.4-linux-arm64
Execute bit is not set for pwsh in the archive.
tar -tvf /Users/donhunt/local/powershell-7.4.4-linux-arm64.tar.gz pwsh
-rw-rw-r-- 0 root root 72544 Jul 17 15:22 pwsh
Thanks @DonPwrShellHunt for reporting the issue and thank you @jpawlowski for opening a quick fix PR 🙌
@DonPwrShellHunt Apologies for the delay. To be honest, I've been busy with my own powershell-extended
feature 🙃
@samruddhikhandale, could you please check again if my adjustments in #1050 are sufficient to be merged into the main
repository?
PowerShell feature install of 7.4.3 for linux arm64 Issue
Issue with install.sh
If an install using GitHub is attempted, install.sh logic for devcontainers/features/src/powershell does not explicitly set pwsh as executable. Successful installation currently depends on the permissions in the tar file.
Symptoms of Failure
If I pinned the version to 7.4.2, the powershell feature would function correctly. Looking at the permissions inside the tar file showed the execute bit was set on pwsh.
Using an explicit version of 7.4.3, latest or not specifying a version, pwsh could not be run because permissions were not set to execute. The install did not return an error code. It just did not function at runtime.
NOTE: The instructions from the powershell team to install powershell into linux using the binaries does include setting pwsh as an executable. In my case I am running MacOS on a MacBook Pro with an M1 processor. Docker Desktop is installed using a linux arm64 virtual machine. When installing devcontainer features, such as powershell, install scripts are running as root in a linux arm64 environment.
In the case of installing from github, powershell-7.4.3-linux-arm64.tar.gz is extracted into /opt/microsoft/powershell/7 but the pwsh executable does not have proper permissions to run.
Fix install.sh
Add chmod after the extract to make pwsh executable.
Fixed as the vscode user with the commands
Log snippets showing before and after fix