hub-detect icon indicating copy to clipboard operation
hub-detect copied to clipboard

The bash script loses multi-word parameters

Open ilatypov opened this issue 6 years ago • 4 comments

Issue template

Expected behavior

  • hub-detect.sh preserves parameters containing spaces.

Actual behavior

  • hub-detect.sh passes only the first word from parameters containing spaces.

Steps to Reproduce

  • bash hub-detect.sh ... --detect.maven.build.command="compile -s settings.xml"

Version

Project Version:

  • master

OS:

  • any

ilatypov avatar Jul 13 '18 18:07 ilatypov

\

ilatypov avatar Aug 08 '18 15:08 ilatypov

@ilatypov thanks for creating all of these! Much appreciated. As mentioned by @ekerwin on your PR, we are going to incorporate your changes as soon as we can. We want to start versioning the shell script though because with over 100+ users, the fear of destabilizing anyone is mounting. Your changes will go into either the hub-detect.sh or hub_detect_5.x.sh.

stavvy-akamen avatar Aug 10 '18 20:08 stavvy-akamen

Is there any work-around for this?

The documentation at https://blackducksoftware.github.io/synopsys-detect/synopsys-detect-5.6.0-help.html states you could pass --detect.maven.build.command='--settings ${HOME}/maven_dev_settings.xml --define reason=other' but this fails as only --settings gets passed into the script.

hexsel avatar Feb 24 '20 17:02 hexsel

I did not see an open issue in the current repository, so opening one there (along with referring to the PR in this issue)

https://github.com/ilatypov/hub-detect/commit/1347ec77283376b6e8c2bbe7ae6d29decb8390ca

would be awesome.

As a work-around we double-protect spaces with a back-slash (which itself needs duplication to avoid its context switching action).

In general, I see an issue bot deployed by Synopsys that aggressively closes "stale" issues in the current project. This makes customers search for substitute solutions.

ilatypov avatar Feb 24 '20 18:02 ilatypov