From 3c2af4cd46c76bfdc68fa256ea815a65ae037aec Mon Sep 17 00:00:00 2001 From: EdTheDev Date: Fri, 29 Jan 2021 09:37:49 -0600 Subject: [PATCH] Profile bugfixes. --- Microsoft.PowerShell_profile.ps1 | 5 ++++- install/profile.ps1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index e0c2494..64fd37c 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -16,7 +16,10 @@ $env:PSModulePath = $env:PSModulePath.Replace("\\ad.uillinois.edu\techsvc\home\$ $ENV:PATH +=":/home/delaport/development/flutter/bin" # Flutter in Kali under WSL # Some Paths that are annoying to find/restore if the installer fails -$IsWindows = ($env:OS -eq "Windows_NT") +if($IsWindows -eq "") { + # Bootstrap for older PowerShell + $IsWindows = ($env:OS -eq "Windows_NT") +} if($IsWindows){ $ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all $ENV:PATH+=";C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\" # Python latest as of 2019 December diff --git a/install/profile.ps1 b/install/profile.ps1 index d2d16b4..22be8ac 100644 --- a/install/profile.ps1 +++ b/install/profile.ps1 @@ -14,7 +14,7 @@ if(-Not(Test-Path -Path $profile)) { # Install Stub PowerShell Profile that sources the one from DotFiles $sourceMeFile = "$pwd\Microsoft.PowerShell_profile.ps1" -$sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path' +$sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path ' $sourceMeLine += $sourceMeFile $sourceMeLine += '));invoke-expression $profileContents' -- 2.47.3