Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save path when stubbed/mocked #9

Merged
merged 3 commits into from
Aug 26, 2023
Merged

Save path when stubbed/mocked #9

merged 3 commits into from
Aug 26, 2023

Conversation

martin-schulze-vireso
Copy link
Member

Supersedes #2

@martin-schulze-vireso martin-schulze-vireso merged commit 9bf10e8 into master Aug 26, 2023
1 check passed
@@ -38,7 +38,7 @@ batslib_err() {
{ if (( $# > 0 )); then
echo "$@"
else
( PATH="$BATS_SAVED_PATH"; command cat -; )
PATH="$BATS_SAVED_PATH" command cat -

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that actually work if cat was mocked? Just want to make sure and can't test right now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a test for that?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it works due to the use of command. I was just wondering if the change from PATH=...; command cat to PATH=... command cat made the PATH modification void.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants