GCE/Windows: use "return" as "continue" for ForEach-Object

Using `continue` would exit the current processing scope.
https://blogs.technet.microsoft.com/msftcam/2015/03/17/powershell-gotcha-foreach-object-and-continue/
This commit is contained in:
Yu-Ju Hong 2019-08-21 15:40:30 -07:00
parent 8cf05f514c
commit 48cc836717

View File

@ -206,7 +206,7 @@ while($true) {
if (-not (Test-Path $user_dir)) {
# If for some reason Create-NewProfile failed to create the user profile
# directory just continue on to the next user.
continue
return
}
# NOTE: there is a race condition here where someone could try to ssh to