Add snippet working directory and env files - #8
Merged
Conversation
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.
Summary
--cwd DIRfor the final snippet process while keeping template setup and dependency installation isolated--env-file FILEloading without mutating the parent shellIsolation semantics
--cwddoes not move the temporary template or makerun-codeexecute inside an existing project. The source snippet and dependencies remain in the generated isolated template. Only the final code process sees the requested working directory.Environment values are supplied for the final launch and snippet process. They are not added to the current shell or earlier setup/dependency-installation commands, and their values are omitted from displayed commands.
Verification
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked(31 tests)cargo package --locked--cwdand--env-file