Fix dynamic run_command_switches appending
This commit is contained in:
parent
b54f091941
commit
373c2edd84
@ -218,9 +218,12 @@ EOS
|
||||
index=$(docker ps -a --filter "name=docker-env-$image_repository-*" --format '{% raw %}{{.Names}}{% endraw %}' | perl -e 'my $max = 0; while (<>) {my ($n) = $_ =~ /(\d+)$/; if ($n > $max) { $max = $n };}; print $max+1;')
|
||||
name="docker-env-$image_repository-$index"
|
||||
|
||||
run_command="docker run --rm -it --name \"$name\" -v $(pwd):/work_dir "
|
||||
run_command="docker run --rm -it --name \"$name\" -v \"$(pwd):/work_dir\" "
|
||||
|
||||
run_command+="${run_command_switches[*]}"
|
||||
for run_command_switch in $run_command_switches
|
||||
do
|
||||
run_command+="\"$run_command_switch\" "
|
||||
done
|
||||
|
||||
run_command+="-w \"$workdir\" \"$image\" $cmd"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user