Skip to content

Commit a3c8c8b

Browse files
authored
Fixing issue where is used in test-path but not set (#526)
Signed-off-by: Mark Rossett <marosset@microsoft.com>
1 parent 7e81a08 commit a3c8c8b

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

capz/templates/gmsa-ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

capz/templates/gmsa-pr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

capz/templates/shared-image-gallery-ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

capz/templates/windows-base.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

capz/templates/windows-ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

capz/templates/windows-pr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ spec:
6767
Write-Output "Extracting new containerd binaries"
6868
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
6969
# Check if kube-log-runner.exe exists
70-
if (Test-Path $kubeloggerPath) {
70+
$kubeloggerPath = Join-Path $env:SYSTEMDRIVE "k\kube-log-runner.exe"
71+
if ($kubeloggerPath -and (Test-Path -Path $kubeloggerPath)) {
7172
Write-Output "Recreating containerd service with kube-log-runner..."
7273
$logPath = "\var\log\containerd"
7374
# Check if directory exists

0 commit comments

Comments
 (0)