Fix data providers don't work when changing directory in setup#531
Merged
Chemaclass merged 1 commit intomainfrom Dec 4, 2025
Merged
Fix data providers don't work when changing directory in setup#531Chemaclass merged 1 commit intomainfrom
Chemaclass merged 1 commit intomainfrom
Conversation
…irectory
When set_up_before_script uses cd to change the working directory,
relative test file paths become invalid for file operations like
grep. This caused data providers to silently fail because the script
file couldn't be found
This was referenced Dec 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Description
Fixes #529 - Data providers now work correctly when
set_up_before_scriptchanges the working directory.When a test file uses
set_up_before_scriptto change directories (e.g.,cd "$(temp_dir)"), data providers were failing because the script path became relative to the new directory instead of the original working directory.🔖 Changes
BASHUNIT_WORKING_DIRenvironment variable to capture the original working directory at startuphelper::get_provider_data()to resolve script paths against the original working directory when relative paths failhelper::check_duplicate_functions()with the same path resolution fix✅ To-do list
CHANGELOG.mdto reflect the new feature or fix