Skip to content

ln: Interactive and Force override each other instead of defaulting to Force if both are specified#11129

Merged
sylvestre merged 2 commits intouutils:mainfrom
Zellic:ln-force-interactive-overrides
Feb 26, 2026
Merged

ln: Interactive and Force override each other instead of defaulting to Force if both are specified#11129
sylvestre merged 2 commits intouutils:mainfrom
Zellic:ln-force-interactive-overrides

Conversation

@aweinstock314
Copy link
Contributor

Comparative output from GNU ln and uu ln prior to the fix:

root@b082d601e194:/tmp# ln --version
ln (GNU coreutils) 9.7
Packaged by Debian (9.7-3)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Parker and David MacKenzie.
root@b082d601e194:/tmp# touch a b
root@b082d601e194:/tmp# ln -sfi a b
ln: replace 'b'? n
root@b082d601e194:/tmp# ls -l
total 0
-rw-r--r-- 2 root root 0 Feb 26 00:01 a
-rw-r--r-- 2 root root 0 Feb 26 00:01 b
root@b082d601e194:/tmp# ln -sif a b
root@b082d601e194:/tmp# ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 26 00:01 a
lrwxrwxrwx 1 root root 1 Feb 26 00:01 b -> a
root@03081849be59:/tmp# ln --version
ln (uutils coreutils) 0.6.0
root@03081849be59:/tmp# touch a b
root@03081849be59:/tmp# ln -sif a b
root@03081849be59:/tmp# ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 26 00:02 a
lrwxrwxrwx 1 root root 1 Feb 26 00:02 b -> a
root@03081849be59:/tmp# rm a b
root@03081849be59:/tmp# touch a b
root@03081849be59:/tmp# ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 26 00:02 a
-rw-r--r-- 1 root root 0 Feb 26 00:02 b
root@03081849be59:/tmp# ln -sfi a b
root@03081849be59:/tmp# ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 26 00:02 a
lrwxrwxrwx 1 root root 1 Feb 26 00:02 b -> a

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/cut/cut-huge-range is now passing!
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)

sylvestre added a commit to sylvestre/coreutils-1 that referenced this pull request Feb 26, 2026
Identified here:
<uutils/coreutils#11129>

* tests/ln/misc.sh: Add the check.
@sylvestre sylvestre merged commit 38ba366 into uutils:main Feb 26, 2026
156 checks passed
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.

2 participants