Skip to content
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

replace all usages of os/exec with golang.org/x/sys/execabs #183

Closed
wants to merge 1 commit into from

Conversation

thaJeztah
Copy link
Contributor

follow-up to #182, only the last commit is new

Following the changes in Go, and golang.org/x/tools themselves, this change
ensures that packages using exec.LookPath or exec.Command to find or run
binaries do not accidentally run programs from the current directory when
they mean to run programs from the system PATH instead.

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah marked this pull request as ready for review March 14, 2021 19:05
@thaJeztah
Copy link
Contributor Author

rebased to get rid of the extra commits, and moved out of draft

Following the changes in Go, and golang.org/x/tools themselves, this change
ensures that packages using exec.LookPath or exec.Command to find or run
binaries do not accidentally run programs from the current directory when
they mean to run programs from the system PATH instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@dnephin
Copy link
Member

dnephin commented Aug 6, 2022

Thanks for working on this! Sorry we never got it merged. It looks like these fixes are now in the stdlib: https://golang.org/doc/go1.19#os-exec-path

I've updated the release builds to use go1.19, so I think we can probably stick to the stdlib now.

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.

None yet

2 participants