error action added
This commit is contained in:
parent
d0688779fb
commit
e026969331
6
run.ps1
6
run.ps1
|
@ -60,10 +60,14 @@ function Start-Embark {
|
||||||
$run_opts = $run_opts + "--rm"
|
$run_opts = $run_opts + "--rm"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$OldErrorActionPreference = $ErrorActionPreference
|
||||||
|
$ErrorActionPreference = 'Continue'
|
||||||
|
|
||||||
function Cleanup {
|
function Cleanup {
|
||||||
$retval = $lastexitcode
|
$retval = $lastexitcode
|
||||||
Remove-Item -Path Function:\Confirm-Docker
|
Remove-Item -Path Function:\Confirm-Docker
|
||||||
Remove-Item -Path Function:\Cleanup
|
Remove-Item -Path Function:\Cleanup
|
||||||
|
$ErrorActionPreference = $OldErrorActionPreference
|
||||||
return $retval
|
return $retval
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +147,7 @@ RUN"
|
||||||
|
|
||||||
$opts = $run_opts + "${EMBARK_DOCKER_IMAGE}:${EMBARK_DOCKER_TAG}" + $cmd
|
$opts = $run_opts + "${EMBARK_DOCKER_IMAGE}:${EMBARK_DOCKER_TAG}" + $cmd
|
||||||
|
|
||||||
"docker run $opts"
|
docker run $opts
|
||||||
|
|
||||||
return Cleanup
|
return Cleanup
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue