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
{{ message }}
Repository navigation
interp: test -nt/-ot might not conform to POSIX 2024 #1340
Hello and first, sorry for the haphazard bug form, since Gentoo doesn't have a gosh package and I just looked at the source code. A small gander at https://github.com/mvdan/sh/blob/master/interp/test.go#L80 seems to imply that [ f1 -nt f2 ] (resp. for -ot) fails if f2 doesn't exist but POSIX sez
pathname1 -nt pathname2
True if pathname1 resolves to an existing file and pathname2 cannot be resolved, or if both resolve to existing files and pathname1 is newer than pathname2 according to their last data modification timestamps; otherwise, false.
Activity
mvdan commentedon Jun 2, 2026
Thanks for spotting and reporting!
interp: make -nt and -ot conform to POSIX when a file is missing