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
Make sure you are able to repro it on the latest version
Search the existing issues.
Steps to reproduce
As https://github.com/orgs/PowerShell/discussions/20962#discussioncomment-7937685 describes, the Snap package cannot be set as the login shell via chsh -s $Shell (where $Shell is the absolute path to the shell binary) without the user manually adding its path to /etc/shells. However, the native (.RPM) package automatically adds itself to that file as every other shell does. For instance, on my system, when the correct path for the snap package has been added, the content of /etc/shells is:
PS /home/RokeJulianLockhart> cat -vbET '/etc/shells'
1 /bin/ash$
2 /bin/bash$
3 /bin/csh$
4 /bin/dash$
5 /bin/false$
6 /bin/ksh$
7 /bin/ksh93$
8 /bin/mksh$
9 /bin/pdksh$
10 /bin/sh$
11 /bin/tcsh$
12 /bin/true$
13 /bin/zsh$
14 /usr/bin/csh$
15 /usr/bin/dash$
16 /usr/bin/ksh$
17 /usr/bin/ksh93$
18 /usr/bin/mksh$
19 /usr/bin/passwd$
20 /usr/bin/pdksh$
21 /usr/bin/bash$
22 /usr/bin/tcsh$
23 /usr/bin/zsh$
24 /usr/bin/fish$
25 /usr/bin/scsh$
26 /usr/bin/rash$
27 /snap/powershell/current/opt/powershell/pwsh$
PS /home/RokeJulianLockhart> # This demonstrates correct manual addition of the path to the snap package rather than what the RPM package does.
Consequently, the installation process needs to add the path, and the uninstallation process remove it. The path should obviously be the vanity path as aforedepicted, not the mount-specific path, as #101 (comment) explains.
Expected behaviour
The aforestated command should set it as the login shell.
Actual behaviour
It does not.
Error details
PS /home/RokeJulianLockhart> Get-Command pwsh
CommandType Name Version Source
----------- ---- ------- ------
Application pwsh 0.0.0.0 /snap/powershell/261/opt/powershell/pwsh
PS /home/RokeJulianLockhart> chsh -s /snap/powershell/261/opt/powershell/pwsh
Password:
chsh: /snap/powershell/261/opt/powershell/pwsh is an invalid shell
PS /home/RokeJulianLockhart> Get-Error
PS /home/RokeJulianLockhart> chsh -s /snap/powershell/261/opt/powershell/pwsh
Password:
chsh: /snap/powershell/261/opt/powershell/pwsh is an invalid shell
PS /home/RokeJulianLockhart> $?
False
PS /home/RokeJulianLockhart>
Prerequisites
Steps to reproduce
As https://github.com/orgs/PowerShell/discussions/20962#discussioncomment-7937685 describes, the Snap package cannot be set as the login shell via
chsh -s $Shell
(where$Shell
is the absolute path to the shell binary) without the user manually adding its path to/etc/shells
. However, the native (.RPM
) package automatically adds itself to that file as every other shell does. For instance, on my system, when the correct path for the snap package has been added, the content of/etc/shells
is:Consequently, the installation process needs to add the path, and the uninstallation process remove it. The path should obviously be the vanity path as aforedepicted, not the mount-specific path, as #101 (comment) explains.
Expected behaviour
The aforestated command should set it as the login shell.
Actual behaviour
It does not.
Error details
Environment data
Version
Visuals
No response
The text was updated successfully, but these errors were encountered: