Skip to content

cp: should print verbose message after interactive prompt #7285

@jfinkels

Description

@jfinkels

Environment: Ubuntu 24.04, uutils main branch (git commit 2afab7c), GNU coreutils v9.6.16-3f7c3-modified.

Steps to reproduce:

touch -d yesterday old
touch new
cp -v -i --update=older new old

What happens now: uutils cp prints 'new' -> 'old' before the interactive prompt:

'new' -> 'old'
cp: overwrite 'old'? y

What I expected to happen: GNU cp prints the verbose message only after the user confirms the operation in the interactive prompt:

cp: overwrite 'old'? y
'new' -> 'old'

Notes: this is causing a failure in the GNU test file tests/cp/cp-i.sh.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions