From 6311c78bcdf19fcc3bf96963960976b047f67e74 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 8 Jun 2022 11:25:20 -0700 Subject: [PATCH] Fix quoting --- src/apps.js | 4 ++-- src/scripts/checkvolume.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps.js b/src/apps.js index 44ca0554c..ab0fbcf3d 100644 --- a/src/apps.js +++ b/src/apps.js @@ -497,8 +497,8 @@ async function checkStorage(volumeId, prefix) { const storageDir = path.join(volume.hostPath, prefix); const [error] = await safe(shell.promises.sudo('checkStorage', [ CHECKVOLUME_CMD, storageDir ], {})); - if (error && error.code === 2) throw new BoxError(BoxError.BAD_FIELD, `Targer directory ${storageDir} is not empty`); - if (error && error.code === 3) throw new BoxError(BoxError.BAD_FIELD, `Targer directory ${storageDir} does not support chown`); + if (error && error.code === 2) throw new BoxError(BoxError.BAD_FIELD, `Target directory ${storageDir} is not empty`); + if (error && error.code === 3) throw new BoxError(BoxError.BAD_FIELD, `Target directory ${storageDir} does not support chown`); return null; } diff --git a/src/scripts/checkvolume.sh b/src/scripts/checkvolume.sh index 719577a98..67c012312 100755 --- a/src/scripts/checkvolume.sh +++ b/src/scripts/checkvolume.sh @@ -24,7 +24,7 @@ readonly test_file="${volume_dir}/.chown-test" mkdir -p "${volume_dir}" rm -f "${test_file}" # clean up any from previous run -if [[ -n "$(ls -A \"${volume_dir}\")" ]]; then +if [[ -n $(ls -A "${volume_dir}") ]]; then echo "volume dir is not empty" exit 2 fi