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

Pathname with spaces is not properly escaped #1006

Open
sebastian-zarzycki opened this issue Sep 28, 2023 · 2 comments
Open

Pathname with spaces is not properly escaped #1006

sebastian-zarzycki opened this issue Sep 28, 2023 · 2 comments

Comments

@sebastian-zarzycki
Copy link

I was trying to run a report for a Maven project that existed in a directory with space in it. It detected that it was MVN properly, but exited with error saying that MVN is not installed (even if it is and the wrapper is in the dir). After some debugging I've discovered that it was cutting the path at the space level and thus couldn't find the binary for command. I.e. in https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/package_managers/maven.rb, but I would imagine it's similar in other places.

    def package_management_command
      wrapper = File.join(project_path, Platform.windows? ? 'mvnw.cmd' : 'mvnw')
      maven = 'mvn'

      File.exist?(wrapper) ? wrapper : maven
    end

If the project path was /Users/Sebastian/Documents/Workspaces/IntelliJ IDEA/my-project, the project_path value at this stage was/Users/Sebastian/Documents/Workspaces/IntelliJ .

@cf-gitbot
Copy link
Collaborator

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@xtreme-shane-lattanzio
Copy link
Contributor

Hey @sebastian-zarzycki ! Thanks for raising this. We are very short on resources so if you could make a PR for this we can get a fix in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants