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 authored and martin-schulze-vireso committed Mar 6, 2022
1 parent c9caa1f commit 6d1fb88
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 @@ -172,7 +172,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 6d1fb88

Please sign in to comment.