Skip to content

Linux executable doesn't start if under a path with spaces #214

@salmonb

Description

@salmonb

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

If the path to the repository contains spaces, the Linux executable generated by Javapackager doesn't start.

Steps to reproduce the issue/enhancement:

  1. Create a directory with spaces (ex: mkdir My\ Projects)
  2. Move the project under that directory
  3. Try to run the executable generated by Javapackager

What is the expected behavior?

The executable should run, whether or not there are spaces in the path

What is the current behavior?

The executable fails to run when there are spaces in the path

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

$ /home/bruno/My\ Projects/myproject/mymodule/target/javapackager/MyApp/MyApp
/home/bruno/My Projects/myproject/mymodule/target/javapackager/MyApp/MyApp: line 13: [: /home/bruno: binary operator expected
/home/bruno/My Projects/myproject/mymodule/target/javapackager/MyApp/MyApp: line 17: cd: $'/home/bruno\nProjects/myproject/mymodule/target/javapackager/MyApp': No such file or directory
/home/bruno/My Projects/myproject/mymodule/target/javapackager/MyApp/MyApp: line 20: /home/bruno: Is a directory

What is the motivation / use case for changing the behavior?

Just make it works :)

Please tell us about your environment:

  • JavaPackager version: 1.6.6
  • OS version: Ubuntu 22.04
  • JDK version: openjdk version "18.0.1.1" 2022-04-22
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeedbackWaiting for feedbackfixedIssue fixed and release pending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions