Repository navigation
pwd: explain failures when the working directory was removed - #15494
Merged
sylvestre merged 1 commit intoOct 19, 2026
Merged
Conversation
limadog9
force-pushed
the
fix/pwd-deleted-directory-error-12967
branch
from
October 18, 2026 19:46
9e62034 to
7ec4fed
Compare
Contributor
|
nearly there, mostly the test duplication to fix |
sylvestre
reviewed
Oct 18, 2026
| physical_path() | ||
| } | ||
| .map_err_context(|| translate!("pwd-error-failed-to-get-current-directory"))?; | ||
| .or_else(|error| { |
Contributor
There was a problem hiding this comment.
the early return under #[cfg(unix)] inside the closure is a bit hard to read, could it be a simple match?
sylvestre
reviewed
Oct 18, 2026
| wasi_runner, | ||
| ignore = "WASI sandbox: requires a host shell and a deleted cwd" | ||
| )] | ||
| fn test_cwd_replaced_with_file() { |
Contributor
There was a problem hiding this comment.
this is almost the same as test_deleted_dir, could you please merge them? (add the file + the -L/-P loop there)
On Unix, report the missing directory entry when getcwd fails with ENOENT. Other failures retain their existing error context. Extend regression coverage to a deleted working directory replaced by a regular file, with both -L and -P. All 15 pwd integration tests pass. Closes uutils#12967.
limadog9
force-pushed
the
fix/pwd-deleted-directory-error-12967
branch
from
October 18, 2026 22:31
7ec4fed to
9ce625d
Compare
Contributor
|
Thanks for your PR |
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.
On Unix, report the missing directory entry when getcwd fails with ENOENT. Other failures retain their existing error context.
Extend regression coverage to a deleted working directory replaced by a regular file, with both -L and -P. All 15 pwd integration tests pass.
Closes #12967.