Skip to content

Commit 30ba707

Browse files
committed
Fix build when the installer is re-cloned and remove InstallerDir parameter
This regression has been introduced by the previous commit, as the relative Ptyhon dir path was not updated when the installer was re-cloned. Remove InstallerDir parameter as there is no reason to keep it, as the InstallerDir is either the current directory or the re-cloned installer. The re-cloned installer also does not make too much sense when a instance of build is using a clean environment. It will be removed in the future. Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
1 parent 7e05d7b commit 30ba707

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

BuildAutomation/BuildCloudbaseInitSetup.ps1

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ SetVCVars $VCVars $platformVCVarsRequired
3333
# Needed for SSH
3434
$ENV:HOME = $ENV:USERPROFILE
3535

36-
$python_dir = Join-Path $repoRootPath "CloudbaseInitSetup\Python_CloudbaseInit"
3736
$basepath = Join-path $scriptPath "build\cloudbase-init"
3837

39-
$ENV:PATH = "$python_dir\;$python_dir\scripts;$ENV:PATH"
4038
$ENV:PATH += ";$ENV:ProgramFiles (x86)\Git\bin\"
4139
$ENV:PATH += ";$ENV:ProgramFiles\7-zip\"
4240

@@ -62,11 +60,7 @@ try
6260
}
6361
else
6462
{
65-
if (!$InstallerDir)
66-
{
67-
# No path provided, so use the current installer script path.
68-
$InstallerDir = (Join-Path -Path $PSScriptRoot -ChildPath ..\ -Resolve)
69-
}
63+
$InstallerDir = (Join-Path -Path $PSScriptRoot -ChildPath ..\ -Resolve)
7064
if (Test-Path $InstallerDir)
7165
{
7266
$cloudbaseInitInstallerDir = $InstallerDir
@@ -76,6 +70,8 @@ try
7670
throw "Installer path not present: $InstallerDir"
7771
}
7872
}
73+
$python_dir = join-path $cloudbaseInitInstallerDir "CloudbaseInitSetup\Python_CloudbaseInit"
74+
$ENV:PATH = "$python_dir\;$python_dir\scripts;$ENV:PATH"
7975

8076
$python_template_dir = join-path $cloudbaseInitInstallerDir "Python$($pythonversion.replace('.', ''))_${platform}_Template"
8177

0 commit comments

Comments
 (0)