jruby-launcher icon indicating copy to clipboard operation
jruby-launcher copied to clipboard

Launcher does not properly pass through -X properties on Windows

Open headius opened this issue 10 years ago • 6 comments

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 avatar Jan 14 '15 15:01 headius

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

headius avatar Jan 14 '15 16:01 headius

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.

cremno avatar Jan 14 '15 18:01 cremno

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

headius avatar Jan 15 '15 15:01 headius

@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 :-(

headius avatar Jan 26 '15 20:01 headius

@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.

cremno avatar Jan 26 '15 22:01 cremno

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

headius avatar Jul 08 '20 21:07 headius