Skip to content

Commit

Permalink
Issue #441
Browse files Browse the repository at this point in the history
Added code to ensure that the final `run` step takes place when using `File` with Windows or Mac hosts. Previously, the `run` step was never reached because the `extract` step (only necessary when using the `Archive` and `Run` parameters) was not processed. Now that step will be effectively ignored when using the `File` parameter for Mac and Windows which should lead everything completing successfully.
  • Loading branch information
bk-cs committed Jan 7, 2025
1 parent 99897d1 commit 1c743f0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion public/psf-real-time-response.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,17 @@ https://github.com/crowdstrike/psfalcon/wiki/Invoke-FalconDeploy
}
}
}
OptionalHostId = if ($Cmd -eq 'mkdir') { $Pair.Value } else { $Optional }
OptionalHostId = if ($Cmd -eq 'mkdir') {
# Use all available hosts, by OS, for initial step
$Pair.Value
} elseif ($Cmd -eq 'run' -and $Pair.Key -match '^(Mac|Windows)$' -and
$PSCmdlet.ParameterSetName -match '_File') {
# Use all available hosts for Mac/Windows when 'extract' step is skipped
$Pair.Value
} else {
# Use hosts that successfully completed previous step
$Optional
}
Timeout = if ($Cmd -eq 'put') { 530 } else { $Timeout }
}
[string[]]$Optional = if ($Param.OptionalHostId -and $Param.Argument) {
Expand Down

0 comments on commit 1c743f0

Please sign in to comment.