Closed Flamefire closed 1 year ago
Fixes https://github.com/ztombol/bats-support/issues/8 by saving the PATH and using command to ignore functions/aliases
command
Note: Needed to use a subshell as PATH="$_BATSLIB_PATH" command cat - did work for the tests but failed in a real world example and I can't figure out why. Even PATH="$_BATSLIB_PATH" command -v cat outputs the correct path.
PATH="$_BATSLIB_PATH" command cat -
PATH="$_BATSLIB_PATH" command -v cat
I am closing this in favor of #9, as I can't add code here (due to the master branch?).
Fixes https://github.com/ztombol/bats-support/issues/8 by saving the PATH and using
command
to ignore functions/aliasesNote: Needed to use a subshell as
PATH="$_BATSLIB_PATH" command cat -
did work for the tests but failed in a real world example and I can't figure out why. EvenPATH="$_BATSLIB_PATH" command -v cat
outputs the correct path.