Skip to content

Conversation

@j4mie
Copy link
Member

@j4mie j4mie commented Sep 17, 2020

Before:

$ crab nvm
Could not find "nvm" in your procfile or $PATH.

After:

$ crab nvm

Node Version Manager (v0.35.3)
...

# off we go
os.execvpe(command[0], command, env)
# Is it a shell function?
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should follow the semantics of shell functions in that they override items in the $PATH, rather than only being called if they don't exist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, so swap the two checks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed


# off we go
os.execvpe(command[0], command, env)
print('Could not find "{}" in your procfile or $PATH.'.format(command[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning here about it also not being a shell function?

Although that would be quite a long message. Shells just do "command not found".

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.

3 participants