Skip to content

Commit

Permalink
fix: isnull of empty add quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
vaggeliskls authored May 18, 2024
1 parent 3446e5e commit 85f9ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Vagrant.configure("2") do |config|
Write-Host "Running $runner";
$random = -join ((48..57) + (97..122) | Get-Random -Count 8 | % {[char]$_});
Expand-Archive -LiteralPath ${GITHUB_RUNNER_FILE} -DestinationPath runner-$random -Force;
if (![string]::IsNullOrEmpty(${PAT})) {
if (![string]::IsNullOrEmpty("${PAT}")) {
Invoke-Expression -Command "C:\\runner-$random\\config.cmd --name ${GITHUB_RUNNER_NAME}_$random --replace --unattended --url ${RUNNER_URL} --labels ${GITHUB_RUNNER_LABELS} --pat ${PAT}";
} else {
Invoke-Expression -Command "C:\\runner-$random\\config.cmd --name ${GITHUB_RUNNER_NAME}_$random --replace --unattended --url ${RUNNER_URL} --labels ${GITHUB_RUNNER_LABELS} --token ${TOKEN}";
Expand Down

0 comments on commit 85f9ba3

Please sign in to comment.