Skip to content

Commit

Permalink
RDP and SSH: Make code and messages even more specific (#2401) (#2407)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeGautherie authored and FeodorFitsner committed Jun 2, 2018
1 parent 0eb80e3 commit 549f11f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions scripts/enable-rdp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
4 changes: 2 additions & 2 deletions scripts/enable-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 549f11f

Please sign in to comment.