Silence file does not exist error when clearing VK files (#3093)

When clearing VK test files - if some files didn't exist (because they weren't created) the bare rm command will report an error that the files didn't exist. We don't care, only that they are removed if they did exist.
pull/3099/head
Kris Gesling 2022-04-20 10:23:48 +09:30 committed by GitHub
parent bf85e5c9c5
commit f030b7e165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -31,8 +31,8 @@ function vktest-clear() {
# A clean directory will have `steps/` and `environment.py`
if [ "$num_feature_files" -gt "2" ] ; then
echo "Removing Feature files..."
rm "${DIR}"/../test/integrationtests/voight_kampff/features/*.feature
rm "${DIR}"/../test/integrationtests/voight_kampff/features/*.config.json
rm -f "${DIR}"/../test/integrationtests/voight_kampff/features/*.feature
rm -f "${DIR}"/../test/integrationtests/voight_kampff/features/*.config.json
fi
STEPS_DIR="$FEATURES_DIR/steps"
num_steps_files=$(count-files "$STEPS_DIR")
@ -42,7 +42,7 @@ function vktest-clear() {
mkdir "$TMP_DIR"
mv "$STEPS_DIR/configuration.py" "$TMP_DIR"
mv "$STEPS_DIR/utterance_responses.py" "$TMP_DIR"
rm "${STEPS_DIR}"/*.py
rm -f "${STEPS_DIR}"/*.py
mv "${TMP_DIR}"/* "$STEPS_DIR"
rmdir "$TMP_DIR"
fi