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

subcommand: Parse and propagate [env] vars at the earliest possible moment #18

Merged
merged 1 commit into from
Mar 26, 2022

Conversation

MarijnS95
Copy link
Member

Strangely enough I added this call at a random place in Subcommand::new(), instead of considering that it was both:

  1. Breaking the logic for deducing target_dir in two separated blocks;
  2. Preventing the first block - which reads environment variables! - from seeing what was configured in .cargo/config.toml through [env].

Fix this by moving the call straight after identifying the root directory for the selected package.

… moment

Strangely enough I added this call at a random place in
`Subcommand::new()`, instead of considering that it was both:
1. Breaking the logic for deducing `target_dir` in two separated blocks;
2. Preventing the first block - which reads environment variables! -
   from seeing what was configured in `.cargo/config.toml` through
   `[env]`.

Fix this by moving the call straight after identifying the root
directory for the selected package.
@MarijnS95
Copy link
Member Author

@dvc94ch This reminds me, I have no idea how [env] vars are going to work with multiple-package selection. It seems the files are scanned from the package root instead of the workspace root, leading to multiple packages (within the same workspace of course) potentially having distinct environment variables...

@MarijnS95 MarijnS95 merged commit 28f5e91 into master Mar 26, 2022
@MarijnS95 MarijnS95 deleted the fix-env-vars-for-target-dir branch March 26, 2022 15:54
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