coreutils: `touch no-file/` fails with a sub optimal error

$ touch no-file/
touch: cannot touch 'no-file/': Other

GNU:

$ touch no-file/
touch: setting times of 'no-file/': No such file or directory

We should probably mix the two and have

touch: cannot touch 'no-file/': No such file or directory

The code is in: https://github.com/uutils/coreutils/blob/1bb23cdf73f22a10d534293cb36d8960930fbac3/src/uu/touch/src/touch.rs#L88

@miDeb Any idea how to implement that? thanks 😃

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Shouldn’t this issue be closed due to this PR?

@chipbuster Could you tell me what error message has to be shown for an OS? I was thinking of no such file or directory for Mac, Linux & BSD targets.

Unfortunately, you’re asking the wrong person. My only contribution to this project has been identifying the source of the error strings–my opinion on what the right message should be matters less than yours, if you end up implementing this, and much less than anyone with some actual involvement with this project