diff options
author | Thomas Powell <powell@progress.com> | 2022-10-28 11:12:57 -0400 |
---|---|---|
committer | Thomas Powell <powell@progress.com> | 2022-10-28 11:12:57 -0400 |
commit | a2ead5b8fbc26f8718345dd50ae988541fe9382a (patch) | |
tree | 4dc84caf920fb567f7ec7360015a199102f0f3c6 | |
parent | b668235003f7f32b96e1efb2e596cc15b0da78fc (diff) | |
download | chef-a2ead5b8fbc26f8718345dd50ae988541fe9382a.tar.gz |
Use Start-Process to invoke git archive
Signed-off-by: Thomas Powell <powell@progress.com>
-rw-r--r-- | habitat/plan.ps1 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 83312c4345..ce3ba6608b 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -45,7 +45,9 @@ function Invoke-Download() { $git_path += "c:\\Program Files\\Git\\bin" try { Push-Location (Resolve-Path "$PLAN_CONTEXT/../").Path - [System.Diagnostics.Process]::Start("$git_path\\git", "archive --format=zip --output=${HAB_CACHE_SRC_PATH}\\${pkg_filename} HEAD") + # [System.Diagnostics.Process]::Start("$git_path\\git", "archive --format=zip --output=${HAB_CACHE_SRC_PATH}\\${pkg_filename} HEAD") + Start-Process -FilePath "$git_path\\git" -Wait -ArgumentList "archive","--format=zip","--output=$HAB_CACHE_SRC_PATH\\$pkg_filename","HEAD" + Start-Sleep -Seconds 30 # getting an error about the archive being in use, adding the sleep to let other handles on the file finish. if (-not $?) { throw "unable to create archive of source" } |