Skip to content
Snippets Groups Projects
Commit 1e919221 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-394: Check if the copy actually succeeds before using its result

parent 653268f1
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,10 @@ fi
# copy file into container to read it from container, as the file's location
# in the container won't be the same as on the host.
docker cp "${file}" dsconfig:/tmp/dsconfig-load-settings.json
docker cp "${file}" dsconfig:/tmp/dsconfig-load-settings.json || exit 1
# write settings
docker exec -it dsconfig json2tango --write /tmp/dsconfig-load-settings.json
# somehow json2tango does not return 0 on success
exit 0
......@@ -9,7 +9,10 @@ fi
# copy file into container to read it from container, as the file's location
# in the container won't be the same as on the host.
docker cp "${file}" dsconfig:/tmp/dsconfig-update-settings.json
docker cp "${file}" dsconfig:/tmp/dsconfig-update-settings.json || exit 1
# update settings
docker exec -it dsconfig json2tango --write --update /tmp/dsconfig-update-settings.json
# somehow json2tango does not return 0 on success
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment