Skip to content

mv: don't prompt to overwrite read-only file when stdin is not a terminal (recovered PR #11346) - #15035

Open
venoosoo wants to merge 10 commits into
uutils:mainfrom
venoosoo:recovered-pr-11346
Open

venoosoo wants to merge 10 commits into
uutils:mainfrom
venoosoo:recovered-pr-11346

Conversation

@venoosoo

@venoosoo venoosoo commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

This is the mv equivalent of #7492, which fixed the same issue for rm.
(Closes #11346)
Changes:

  • prompt_overwrite now skips the prompt when stdin is not a terminal and OverwriteMode is Default (implicit read-only protection), matching GNU mv behavior
  • Added test test_mv_no_prompt_when_stdin_not_terminal

Fixes #11321

@cakebaker cakebaker changed the title Recovered pr #11346 mv: don't prompt to overwrite read-only file when stdin is not a terminal (recovered PR #11346) Oct 2, 2026
@MuntasirSZN

Copy link
Copy Markdown
Contributor

Clippy failing...

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)

@xtqqczze

xtqqczze commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@venoosoo In future, please reopen the existing PR other than creating a new one.

@venoosoo

venoosoo commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@venoosoo In future, please reopen the existing PR other than creating a new one.

yeah but i couldnt figure out how

@xtqqczze

xtqqczze commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

@venoosoo Please could you update the title and description (with the description to include Closes #11346).

Please also drop the merge commits and then rebase for a clean branch history (fmt fix etc. does't need to be a seperate commit)

This branch has not been deployed

No deployments
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.

mv: prompts to overwrite read-only file when stdin is not a terminal

3 participants