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

Launcher does not properly pass through -X properties on Windows #33

Open
headius opened this issue Jan 14, 2015 · 6 comments
Open

Launcher does not properly pass through -X properties on Windows #33

headius opened this issue Jan 14, 2015 · 6 comments

Comments

@headius
Copy link
Member

headius commented Jan 14, 2015

This could be some oddity in how powershell passes arguments through to our launcher:

PS C:\dev\jruby> jruby -Xbacktrace.style=raw -e 1
jruby: warning: unknown property jruby.backtrace
Error opening script file: C:/dev/jruby/.style=raw (The system cannot find the file specified)

The . is improperly being treated as the end of our argument. PowerShell appears to be splitting incoming arguments at .. I'm not sure how to fix this in the launcher other than detecting we're on PowerShell and de-mangling those arguments :-(

This is running from a self-built clone, rather than using installer.

@headius
Copy link
Member Author

headius commented Jan 14, 2015

As expected, it does work with cmd.exe. So this is specific to PowerShell.

@cremno
Copy link

cremno commented Jan 14, 2015

The stop-parsing symbol can be used:
jruby --% -Xbacktrace.style=raw -e 1

Or just quote any arguments which contain a dot (or any other special characters):
jruby "-Xbacktrace.style=raw" -e 1

Quoting the dot should actually be enough, but it looks weird.

@headius
Copy link
Member Author

headius commented Jan 15, 2015

@cremno Ahh thank you, that's a neat workaround.

@headius
Copy link
Member Author

headius commented Jan 26, 2015

@cremno Do you know what we should be doing differently in the launcher (C++)? It's incredibly inconvenient that PowerShell processes arguments differently than cmd.exe :-(

@cremno
Copy link

cremno commented Jan 26, 2015

@headius: I think you can't do much (non-hacky) in this case. The command line is always “mangled” since PowerShell does its job before creating the process and passing it.

@headius headius transferred this issue from jruby/jruby Jul 8, 2020
@headius
Copy link
Member Author

headius commented Jul 8, 2020

PowerShell should be considered for the in-progress rewrite of this launcher.

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

No branches or pull requests

2 participants