-
Notifications
You must be signed in to change notification settings - Fork 23
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
Dont load users zshrc file during test runs #82
Comments
@MichaelAquilina I'll have to double check later, but I don't think we are loading |
Hmmm maybe I'll doubel check that I actually experienced this. If I manage to find a reproducible scenario I'll post it here :) |
So the way I'm testing this is with the following minimal test case:
I then run Is this expected? |
This patch also shows the same issue (run with --verbose)
|
Variables yes, since they're inherited by child processes. Aliases and functions defined in |
I wasnt aware of that! I found that you can run |
If we can get it working it would be a great feature, but I wouldn't want to make it the default, as it would break expected POSIX behaviour. It might work to add a That could be difficult though - since ZUnit declares it's own vars and functions internally which are then cascaded down to the test level (including the test functions themselves), we'd lose those as well, and I don't know at what level we'd be able to do that without breaking things. Perhaps we could listen for the flag, then if it's set, internally we end processing, and relaunch the entire process using something like |
You are right, thinking about it, many things would break with the environment unset 🤔 |
Yeah, having thought about it some more, we'd lose |
Yeah that all makes sense to me. Thanks for the help and feedback @molovo! I think its safe to mark this issue as closed |
Tests should be independent from what's contained within the users zsh configuration as it can interfere with the test process. In short, tests should not load the user's zshrc profile when running tests.
(PS: Only just realised I had an invitation pending for me to join this project, sorry about that!)
The text was updated successfully, but these errors were encountered: