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

Avoid changing the current working directory #485

Closed
casey opened this issue Oct 9, 2019 · 0 comments · Fixed by #522
Closed

Avoid changing the current working directory #485

casey opened this issue Oct 9, 2019 · 0 comments · Fixed by #522
Labels

Comments

@casey
Copy link
Owner

casey commented Oct 9, 2019

Just changes its CWD to the same directory as the justfile, so subprocesses inherit the CWD of the just. I dislike that there are implicit dependencies in the code between where the working directory is changed and where it's used. Ideally, it would be nice to determine the working directory up front, save it in the Config object, and pass it to subcommands using Command::current_dir().

Note: Don't save it in the config object, since the config object should be derived solely from the arguments. Also put invocation_directory somewhere else.

Notes to self:

  • test that fails if current dir isn't set correctly, backticks, recipes
  • resolve -> resolve_justfile, or search, search::justfile for justfile
  • test config parsing, all arguments (also test running?)
  • config.run() -> config.subcommand.run()
@casey casey added this to the soon milestone Oct 13, 2019
@casey casey modified the milestones: soon, 1.0 Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant