88 [string ]$CloudbaseInitRepoBranch = " master" ,
99 # Use an already available installer or clone a new one.
1010 [switch ]$ClonePullInstallerRepo = $true ,
11- [string ]$InstallerDir = $null ,
1211 [string ]$VSRedistDir = " ${ENV: ProgramFiles(x86)} \Common Files\Merge Modules" ,
1312 [string ]$SignTimestampUrl = " http://timestamp.digicert.com?alg=sha256" ,
1413 [string ]$VCVars = " 2019"
@@ -33,10 +32,8 @@ SetVCVars $VCVars $platformVCVarsRequired
3332# Needed for SSH
3433$ENV: HOME = $ENV: USERPROFILE
3534
36- $python_dir = Join-Path $repoRootPath " CloudbaseInitSetup\Python_CloudbaseInit"
3735$basepath = Join-path $scriptPath " build\cloudbase-init"
3836
39- $ENV: PATH = " $python_dir \;$python_dir \scripts;$ENV: PATH "
4037$ENV: PATH += " ;$ENV: ProgramFiles (x86)\Git\bin\"
4138$ENV: PATH += " ;$ENV: ProgramFiles \7-zip\"
4239
6259 }
6360 else
6461 {
65- if (! $InstallerDir )
66- {
67- # No path provided, so use the current installer script path.
68- $InstallerDir = (Join-Path - Path $PSScriptRoot - ChildPath ..\ - Resolve)
69- }
62+ $InstallerDir = (Join-Path - Path $PSScriptRoot - ChildPath ..\ - Resolve)
7063 if (Test-Path $InstallerDir )
7164 {
7265 $cloudbaseInitInstallerDir = $InstallerDir
7669 throw " Installer path not present: $InstallerDir "
7770 }
7871 }
72+ $python_dir = join-path $cloudbaseInitInstallerDir " CloudbaseInitSetup\Python_CloudbaseInit"
73+ $ENV: PATH = " $python_dir \;$python_dir \scripts;$ENV: PATH "
7974
8075 $python_template_dir = join-path $cloudbaseInitInstallerDir " Python$ ( $pythonversion.replace (' .' , ' ' )) _${platform} _Template"
8176
0 commit comments