Skip to content

Try running script from working directory #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 5, 2022

Conversation

clubby789
Copy link
Contributor

Fixes #234
If we have a non-absolute path that doesn't begin with ./, check for the script in the current directory and adjust the script path if it exists.

Copy link
Collaborator

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I'd love to get this fixed, as I often find it awkward to need ./.

Copy link
Collaborator

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

I suppose this will break if someone passes an executable from PATH, but I imagine 99% of the time that isn't the case. If that's an issue, we can revert or adjust as needed.

@ehuss ehuss merged commit 961bcd3 into rust-lang:master Nov 5, 2022
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.

panic trying to run script, when script is given with just a filename
2 participants