diff --git a/scripts/enable-rdp.ps1 b/scripts/enable-rdp.ps1 index 31cc0b1..69966a0 100644 --- a/scripts/enable-rdp.ps1 +++ b/scripts/enable-rdp.ps1 @@ -62,11 +62,13 @@ if(-not $env:appveyor_rdp_password) { } if($blockRdp) { - # create "lock" file. $path = "$($env:USERPROFILE)\Desktop\Delete me to continue build.txt" + # create "lock" file. Set-Content -Path $path -Value '' Write-Warning "Build paused. To resume it, open a RDP session to delete 'Delete me to continue build.txt' file on Desktop." - - while($true) { if (-not (Test-Path $path)) { break; } else { Start-Sleep -Seconds 1 } } - Write-Host "Build lock has been deleted. Resuming build." + # wait until "lock" file is deleted by user. + while(Test-Path $path) { + Start-Sleep -Seconds 1 + } + Write-Host "Build lock file has been deleted. Resuming build." } diff --git a/scripts/enable-ssh.sh b/scripts/enable-ssh.sh index d865bc5..5596634 100644 --- a/scripts/enable-ssh.sh +++ b/scripts/enable-ssh.sh @@ -61,9 +61,9 @@ if [[ -n "${APPVEYOR_SSH_BLOCK}" ]] && ${APPVEYOR_SSH_BLOCK}; then # create "lock" file. touch "${LOCK_FILE}" echo -e "Build paused. To resume it, open a SSH session to run '${YELLOW}rm "${LOCK_FILE}"${NC}' command." - # wait until $HOME/build.lock deleted by user. + # wait until "lock" file is deleted by user. while [ -f "${LOCK_FILE}" ]; do sleep 1 done - echo "Build lock has been deleted. Resuming build." + echo "Build lock file has been deleted. Resuming build." fi