-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement shellSplitString for proper handling of NIX_SSHOPTS with sp…
…aces and quotes
- Loading branch information
Showing
5 changed files
with
248 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
synopsis: "Improved `NIX_SSHOPTS` parsing for better SSH option handling" | ||
issues: [5181] | ||
prs: [12020] | ||
--- | ||
|
||
The parsing of the `NIX_SSHOPTS` environment variable has been improved to handle spaces and quotes correctly. | ||
Previously, incorrectly split SSH options could cause failures in CLIs like `nix-copy-closure`, | ||
especially when using complex ssh invocations such as `-o ProxyCommand="ssh -W %h:%p ..."`. | ||
|
||
This change introduces a `shellSplitString` function to ensure | ||
that `NIX_SSHOPTS` is parsed in a manner consistent with shell | ||
behavior, addressing common parsing errors. | ||
|
||
For example, the following now works as expected: | ||
|
||
```bash | ||
export NIX_SSHOPTS='-o ProxyCommand="ssh -W %h:%p ..."' | ||
``` | ||
|
||
This update improves the reliability of SSH-related operations using `NIX_SSHOPTS` across Nix CLIs. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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