Alphanet/Zeronet: fix usage of external file
This commit is contained in:
parent
3ceaed4dd3
commit
f6e0fdfdf5
@ -352,25 +352,22 @@ stop_endorser() {
|
||||
run_client() {
|
||||
assert_node_uptodate
|
||||
declare -a container_args=();
|
||||
tmpdir=$(exec_docker mktemp)
|
||||
tmpdir="/tmp"
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == 'container:'* ]]; then
|
||||
local_path="${arg#container:}"
|
||||
if [[ "$local_path" != '/'* ]]; then
|
||||
local_path="$current_dir/$local_path"
|
||||
fi
|
||||
docker exec "$docker_container" mkdir -p -m 777 "$tmpdir"
|
||||
file_name=$(basename "${local_path}")
|
||||
docker_path="$tmpdir/$file_name"
|
||||
docker cp "${local_path}" "$docker_node_container:${docker_path}"
|
||||
exec_docker chmod 644 "${docker_path}"
|
||||
container_args+=("file:$docker_path");
|
||||
container_args+=("$docker_path");
|
||||
else
|
||||
container_args+=("${arg}");
|
||||
fi
|
||||
done
|
||||
exec_docker tezos-client "${container_args[@]}"
|
||||
exec_docker rm -rf $tmpdir # Remove copied files
|
||||
}
|
||||
|
||||
run_shell() {
|
||||
|
Loading…
Reference in New Issue
Block a user