fix run_script dangling-quote bug

This commit is contained in:
mahim23 2018-09-13 17:41:14 +05:30
parent e026969331
commit ed98f19394
1 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,7 @@ function Start-Embark {
if (-not ($EMBARK_DOCKER_RUN)) {
if ($cmd[0] -cin @("-V", "--version", "-h", "--help", "new", "demo", "build", "run", "blockchain",
"simulator", "test", "reset", "graph", "upload", "version")) {
$cmd = "embark " + $cmd
$cmd = @("embark") + $cmd
}
}
else {
@ -131,7 +131,10 @@ function Start-Embark {
}
$run_script = Get-Content $EMBARK_DOCKER_RUN
$run_script = $run_script -join "`n"
# " doesn't directly get passed to the container so has to be replaced by \"
$run_script = $run_script -join "`n" -replace '"', '\"'
$run_script = "exec bash -${i_flag}s `$(tty) ${cmd} << 'RUN'
__tty=`$1
shift