You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using bats-file to test a git plugin I'm writing in bash, so I use temp_make to create a folder run the test and then temp_del to remove the folder. Because of the permissions git sets on the .git folder, when temp_del invokes rm, it asks for user confirmation and blocks the tests.
I've worked around it by pipping yes to the command.
replacing result="$(rm -r -- "$path" 2>&1)"
with result="$(yes | rm -r -- "$path" 2>&1)"
An alternative would be to use -fr instead of just -r, but I thought that would be a bit too risky. If you think this might be worth a fix, I can push it upstream and make a PR.
The text was updated successfully, but these errors were encountered:
I'm using bats-file to test a git plugin I'm writing in bash, so I use temp_make to create a folder run the test and then temp_del to remove the folder. Because of the permissions git sets on the .git folder, when temp_del invokes rm, it asks for user confirmation and blocks the tests.
I've worked around it by pipping yes to the command.
replacing
result="$(rm -r -- "$path" 2>&1)"
with
result="$(yes | rm -r -- "$path" 2>&1)"
An alternative would be to use
-fr
instead of just-r
, but I thought that would be a bit too risky. If you think this might be worth a fix, I can push it upstream and make a PR.The text was updated successfully, but these errors were encountered: