Skip to content

Commit 40740ce

Browse files
committed
Add exit to cd command in case cd fails
Fixing shellcheck warnings and adding in exit
1 parent 3fb3703 commit 40740ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/openemr/flex/utilities/devtoolsLibrary.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ backupOpenemr() {
121121

122122
# parameter 1 is identifier
123123
restoreOpenemr() (
124-
cd /snapshots
124+
cd /snapshots || exit
125125
tar -C /snapshots -xzf "${1}.tgz"
126126
# need to empty the database before the restore database import
127127
mariadb-dump --skip-ssl -u "${CUSTOM_ROOT_USER}" --password="${MYSQL_ROOT_PASS}" -h "${MYSQL_HOST}" -P "${CUSTOM_PORT}" --add-drop-table --no-data "${CUSTOM_DATABASE}" |

0 commit comments

Comments
 (0)