Skip to content

Commit

Permalink
Silence file does not exist error when clearing VK files (#3093)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
krisgesling committed Apr 20, 2022
1 parent bf85e5c commit f030b7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/mycroft-skill-testrunner
Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit f030b7e

Please sign in to comment.