port diagnose bug

Ryan Schmidt ryandesign at macports.org
Wed Feb 1 06:42:10 UTC 2017


> On Jan 31, 2017, at 14:36, Mark Bestley <news at bestley.co.uk> wrote:
> 
> On 31/01/2017 12:30, Barry Scott wrote:
>> 
>>> On 28 Jan 2017, at 18:40, Mark Bestley <news at bestley.co.uk> wrote:
>>> 
>>> port diagnose gives me
>>> 
>>> Warning: your $PATH environment variable does not currently include, /opt/local/bin, which is where port is located.  Would you like to add /opt/local/bin to your $PATH variable now? [Y/N]
>>> 
>>> Well it is on my path
>>> 
>>> $ echo $PATH
>>> /Users/mark/bin /Users/mark/anaconda/bin /Users/mark/.gem/bin /usr/local/bin /opt/local/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Frameworks/Mono.framework/Versions/Current/Commands
>>> 
>>> 
>>> and no I do not want it added (see other thread)
>> 
>>> 
>>> I suspect the issue is that I am using fish as my shell
>> 
>> The install code only adds for bash and tcsh all other shells are ignored.
>> 
> 
> Yes I know that - the issue is that I don't want the warning message.
> 
> Also seeing the other thread I would note I am running the shell from iTerm explicitly  and it is not set up as a shell in /etc/shells
> 

Please report the bug in the issue tracker.

It looks like the port diagnose code assumes the path is colon-separated, but your fish shell uses spaces to delimit the different paths. I guess MacPorts would have to check what shell you're using, and then know how to parse each type of shell's idea of how the list of paths is represented.

As Barry mentioned, the rest of MacPorts doesn't know anything about the fish shell either. But in the case of the pkg installer, it simply does nothing if your shell is not of the known varieties, whereas port diagnose apparently makes invalid assumptions and presents inaccurate warnings.



More information about the macports-users mailing list