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

Added support for jabba exec. #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added support for jabba exec. #289

wants to merge 1 commit into from

Conversation

ketan
Copy link

@ketan ketan commented Sep 18, 2018

Refactored use command to improve usability by introducing a GetVars
function that returns the functions to be exported for use by exec.

Implemented an exec that simply passes the args as-is to the specified
binary via syscall.Exec.

Fixes #285

Refactored `use` command to improve usability by introducing a `GetVars`
function that returns the functions to be exported for use by `exec`.

Implemented an `exec` that simply passes the args as-is to the specified
binary via `syscall.Exec`.

Fixes shyiko#285
@ketan
Copy link
Author

ketan commented Sep 18, 2018

I've taken the liberty of bumping the version in the changelog, hope that's not going to be a problem.

Could you let me know when you release the new binary? Hope it's sooner than later :)

Thanks.

@shyiko
Copy link
Owner

shyiko commented Sep 19, 2018

@ketan thank you! This looks great.

Any chance you would be willing to do something about Windows (syscall.Exec returns EWINDOWS)? Ideally, exec should work on all target OSs. A message showing that it's not supporfted on Windows would work too I suppose.

@ketan
Copy link
Author

ketan commented Sep 19, 2018

Sorry, I did not see EWINDOWS, since I'm on a mac. I can take a look at implementing this via a an exec.Command which waits and exits with the exit code of the wrapped process. Not ideal, but is cross platform.

@ketan
Copy link
Author

ketan commented Sep 19, 2018

FYI: exec.Command is exactly what I was trying to avoid by replacing the current process with the process corresponding to the args that were passed in.

@shyiko
Copy link
Owner

shyiko commented Sep 19, 2018

@ketan I understand. I'm not asking to replace syscall.Exec. It should stay. All we need is runtime.GOOS == "windows" case :).

@ketan
Copy link
Author

ketan commented Sep 19, 2018

To be honest, my motivation of doing exec was running without a shell/powershell shim on CI systems across different platforms that we want to test with. So I'd much rather implement something that works.

@shyiko
Copy link
Owner

shyiko commented Sep 19, 2018

Up to you. I'm fine with either case.

@jkroepke
Copy link

Any news about this feature?

@nicerloop
Copy link

Not a followup of this feature per se, but you could have a look at https://github.com/nicerloop/jabba-wrapper

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.

Allow jabba exec JAVA_VERSION COMMAND
4 participants