Skip to content

Commit

Permalink
Removed pipe in temp_del() function
Browse files Browse the repository at this point in the history
Per comment [here](bats-core/bats-core#276 (comment)) by @Vampire, piped commands aren't necessary when main command has arguments that cover the use case.
  • Loading branch information
tralston committed May 2, 2020
1 parent 2eb1e23 commit bd858f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/temp.bash
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ temp_del() {

# Delete directory.
local result
result="$(yes | rm -r -- "$path" 2>&1)"
result="$(rm -rf -- "$path" 2>&1)"
if (( $? )); then
echo "$result" \
| batslib_decorate 'ERROR: temp_del' \
Expand Down

0 comments on commit bd858f0

Please sign in to comment.