You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
working-dir = "~" (or ~/projects) was passed to the pty literally and failed, since nothing expanded the tilde.
A nonexistent directory made the spawn fail or land somewhere unexpected with no feedback.
The fork pty path, the default on Linux/BSD via use-fork = true, never received the working directory at all, so the option was silently ignored there (same family as the shell.args bug fixed in pass shell args through the fork pty path #1721).
resolve_working_dir now expands a leading tilde, validates the path is a directory, and logs a warning while falling back to inheriting the current directory when it is not. The spawn path resolves through it, and create_pty_with_fork takes the directory and chdirs in the forked child before exec (resolved in the parent so the failure path can log). Six unit tests cover the resolution rules.
Review notes on this one: the fork-side chdir is async-signal-safe with the CString built pre-fork, defaults are unaffected (default working-dir is None), and all three unix spawn entry points are covered. One regression the first revision would have introduced: the flatpak branch forwards --directory to flatpak-spawn --host, where the host may see directories the sandbox cannot, so validating inside the sandbox could silently drop a working host path. Reworked so tilde expansion applies everywhere but existence validation happens only at the local use sites (the builder cwd and the fork child); the flatpak host keeps receiving the expanded path untouched. The failing Build check is the repo-wide nix/FlakeHub credential issue, same as every sibling PR.
hello ! LGTM, anything blocking ? can adopt it if anything is missing
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
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.
Three related
working-dirproblems (#1088):working-dir = "~"(or~/projects) was passed to the pty literally and failed, since nothing expanded the tilde.use-fork = true, never received the working directory at all, so the option was silently ignored there (same family as theshell.argsbug fixed in pass shell args through the fork pty path #1721).resolve_working_dirnow expands a leading tilde, validates the path is a directory, and logs a warning while falling back to inheriting the current directory when it is not. The spawn path resolves through it, andcreate_pty_with_forktakes the directory and chdirs in the forked child before exec (resolved in the parent so the failure path can log). Six unit tests cover the resolution rules.Closes #1088.