jbang: jbang doesn't work if path to java contains spaces (Windows)

jbang doesn’t work if path to java binary contains spaces.

$ jbang https://twitter.com/maxandersen/status/1266904846239752192 twitter!
Der Befehl ""C:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

My Java-Location: C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot\bin (Sorry, for pasting in German)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Was able to reproduce:

C:\Users\tako>jbang --insecure https://twitter.com/maxandersen/status/1266904846239752192 twitter!
'"C:\Temp\jdk' is not recognized as an internal or external command,
operable program or batch file.