Fish-shell: improve warning when adding invalid path to $PATH

Created on 12 Oct 2016  路  1Comment  路  Source: fish-shell/fish-shell

@nhumrich recently commented on issue #712 that the warning message(s) produced by putting an invalid path in the $PATH variable is confusing. Here's an example:

$ set PATH /arglebargle $PATH
set: Warning: path component /arglebargle may not be valid in PATH.
set: No such file or directory

Their proposal is to emit a warning along these lines:

set: Warning: path component /home/nhumrich/.bin may not be valid in PATH.
  reason: No such file or directory (/home/nhumrich/.bin)

While I think mentioning the path twice is suboptimal I definitely agree that we can and should provide a clearer diagnostic message. I'd like to see a few proposals and up-votes for a specific proposal before we change this.

enhancement good first issue

Most helpful comment

How about $PATH component /home/nhumrich/.bin does not seem to exist (or "is not readable" or "is not a directory" if that's the case)?

>All comments

How about $PATH component /home/nhumrich/.bin does not seem to exist (or "is not readable" or "is not a directory" if that's the case)?

Was this page helpful?
0 / 5 - 0 ratings