Because snap doesn’t run the executables directly, powershell
in /snap/bin/powershell
is actually a symlink to snapd itself, which effectively runs snap run powershell
and sets up the environment.
It’s more likely to apply to strict snaps due to the additional layers involved, but even in classic, you’re bypassing wrappers such as setting the $SNAP
variables apps might expect to actually function (E.G, if a script points to $SNAP/bin/executable
, it might instead accidentally try /bin/executable
which may not exist or be compatible).