Setup fixed setup of MyPSScriptRoot (again)

This commit is contained in:
lksz 2020-10-02 15:42:40 -04:00
parent fe97c2880a
commit ccaaadf371
2 changed files with 7 additions and 3 deletions

View file

@ -6,7 +6,7 @@
[switch]$NoGitClone,
[string]$GitURL = 'https://code.lksz.me/lksz/PowerShell_Scripts',
[Parameter(DontShow)]
[string]$MyPSScriptRoot = $MyPSScriptRoot
[string]$My_PSScriptRoot = $MyPSScriptRoot
)
function _Setup {
@ -18,7 +18,7 @@ function _Setup {
[switch]$NoGitClone,
[string]$GitURL = 'https://code.lksz.me/lksz/PowerShell_Scripts',
[Parameter(DontShow)]
[string]$MyPSScriptRoot = $MyPSScriptRoot)
[string]$My_PSScriptRoot = $MyPSScriptRoot)
#######################################################################
@ -41,6 +41,7 @@ Get-Command Reload-MyScripts -ErrorAction SilentlyContinue | ForEach-Object { .
#######################################################################
. ProfileCode_common
if( -not $MyPSScriptRoot ) { throw '$MyPSScriptRoot does NOT exist!' }
if ( -not $NoGitClone -and -not (Test-Path $(Join-Path $MyPSScriptRoot '.git')) ) {
if ( -not [bool]$(Get-Command git -ErrorAction SilentlyContinue) ) {