Fixed startup issues

Fixed Package condition testing which would fail, but also made it more
verbose.
Fixed shell-loading-snippets because of the rename to Setup-ScriptEnv.
This commit is contained in:
lksz 2021-04-27 17:41:00 -04:00
parent 5b8f0ca309
commit 35fe3a156f
4 changed files with 10 additions and 6 deletions

View file

@ -8,10 +8,10 @@ if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]
export DOTNET_CLI_TELEMETRY_OPTOUT=1
fi
echo "$(date) SZ_SKIP_DEFAULT_SHELL='$SZ_SKIP_DEFAULT_SHELL'; pwsh: $(which pwsh); Setup-Profile: $(ls ~/.local/share/powershell/Scripts/Setup-Profile.ps1) " >> /tmp/default_shell
echo "$(date) SZ_SKIP_DEFAULT_SHELL='$SZ_SKIP_DEFAULT_SHELL'; pwsh: $(which pwsh); Setup-ScriptEnv: $(ls ~/.local/share/powershell/Scripts/Setup-ScriptEnv.ps1) " >> /tmp/default_shell
if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then
export SZ_SKIP_DEFAULT_SHELL=1
if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then
if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-ScriptEnv.ps1 ]]; then
echo 'Starting PowerShell SZcripts...'
echo "pwsh" >> /tmp/default_shell
pwsh