Fix quoting

This commit is contained in:
Girish Ramakrishnan
2022-06-08 11:25:20 -07:00
parent 544ca6e1f4
commit 6311c78bcd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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