-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[powershell]
: Fix manual PowerShell installation binary execution p…
…ermissions (#1050) * Align manual pwsh install with DEB package - ensure execution permissions for pwsh - correct path from /usr/local/bin/pwsh to /usr/bin/pwsh - register as shell in /etc/shells * Update versions * Update repositories * Check for existing pwsh installation This will avoid build failures when multiple features depend on this PowerShell package * test: Fix PS profile test * Test: Fix install_using_github * Test: Fix getcwd warning * fix: Move out of directory before deleting it * test: Add validate_powershell_installation * test: Change Ubuntu test base image to upcoming new LTS version
- Loading branch information
1 parent
3bf4e20
commit 878a900
Showing
5 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Import test library for `check` command | ||
source dev-container-features-test-lib | ||
|
||
# Extension-specific tests | ||
check "pwsh file is symlink" bash -c "[ -L /usr/bin/pwsh ]" | ||
check "pwsh symlink is registered as shell" bash -c "[ $(grep -c '/usr/bin/pwsh' /etc/shells) -eq 1 ]" | ||
check "pwsh target is correct" bash -c "[ $(readlink /usr/bin/pwsh) = /opt/microsoft/powershell/7/pwsh ]" | ||
check "pwsh target is registered as shell" bash -c "[ $(grep -c '/opt/microsoft/powershell/7/pwsh' /etc/shells) -eq 1 ]" | ||
check "pwsh owner is root" bash -c "[ $(stat -c %U /opt/microsoft/powershell/7/pwsh) = root ]" | ||
check "pwsh group is root" bash -c "[ $(stat -c %G /opt/microsoft/powershell/7/pwsh) = root ]" | ||
check "pwsh file mode is -rwxr-xr-x" bash -c "[ $(stat -c '%A' /opt/microsoft/powershell/7/pwsh) = '-rwxr-xr-x' ]" | ||
check "pwsh is in PATH" bash -c "command -v pwsh" | ||
|
||
# Report result | ||
reportResults |