Skip to content

Commit 03213d0

Browse files
committed
CI: strip whitespace from guest.run output
1 parent 90cf676 commit 03213d0

File tree

1 file changed

+2
-1
lines changed
  • ci/tasks/install-windows-updates

1 file changed

+2
-1
lines changed

ci/tasks/install-windows-updates/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ function get_windows_updates_remaining() {
9090

9191
if [[ "${exit_code}" == "null" ]]; then
9292
echo "Checking for updates remaining (via 'guest.run')..." >&2
93-
exit_code=$(
93+
raw_exit_code=$(
9494
govc guest.run \
9595
-vm.ipath="${vm_ipath}" \
9696
-l="${vm_username}:${vm_password}" \
9797
"${powershell_exe}" \
9898
"(Get-WindowsUpdate).Count"
9999
)
100+
exit_code="${raw_exit_code/$'\r'/}"
100101
echo "Checking for updates remaining (via 'guest.run') returned '${exit_code}'" >&2
101102
fi
102103

0 commit comments

Comments
 (0)