From e026969331b0bf32ba723e24ef4c32d7f5af8aa4 Mon Sep 17 00:00:00 2001 From: mahim23 Date: Wed, 12 Sep 2018 14:31:32 +0530 Subject: [PATCH] error action added --- run.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run.ps1 b/run.ps1 index 1e716fc..5b99f4b 100644 --- a/run.ps1 +++ b/run.ps1 @@ -60,10 +60,14 @@ function Start-Embark { $run_opts = $run_opts + "--rm" } + $OldErrorActionPreference = $ErrorActionPreference + $ErrorActionPreference = 'Continue' + function Cleanup { $retval = $lastexitcode Remove-Item -Path Function:\Confirm-Docker Remove-Item -Path Function:\Cleanup + $ErrorActionPreference = $OldErrorActionPreference return $retval } @@ -143,7 +147,7 @@ RUN" $opts = $run_opts + "${EMBARK_DOCKER_IMAGE}:${EMBARK_DOCKER_TAG}" + $cmd - "docker run $opts" + docker run $opts return Cleanup }