From 549f11f57e71c70ba51f440498e39e0a76e6c32a Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Sat, 2 Jun 2018 16:28:04 +0200 Subject: [PATCH] RDP and SSH: Make code and messages even more specific (#2401) (#2407) --- scripts/enable-rdp.ps1 | 10 ++++++---- scripts/enable-ssh.sh | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) 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