Open ilatypov opened 6 years ago
Changes to the shell script right now are concerning because they aren't tied to a release and are immediately put into customer's hands. This is changing soon so we'll be able to more safely introduce changes to the shell script.
This method of preserving multi-word parameters is much better than what we original did since our implementation demanded the 'rm' command be used to clean up the file we create and a customer just experienced problems with that.
In the fullness of time, we should be able to merge this PR to change the shell script as soon as we can change and test it - I'm hoping for detect 4.3.0 (sometime in the early fall of 2018).
Should the original script use “set -x”? Can’t possible check/test for everything, so using set -x can be a good catch all. Curl can fail due to a bad domain, filename, network, etc; but the curl executable will still be successful. Can we implement the usage of getting and checking the http_code (-w "%{http_code}”). When I test this using good and bad data, the return status is always 0, but the http_code will be 200 for successful commands. My output:
$ ./testCurl.sh
Bad name status: 404 : return status: 0
Bad domain status: 404 : return status: 0
Valid file and domain status: 200 : return status: 0
Any updates on this? When can this be integrated? (Asking since I've run into the same issue...)
Should the original script use “set -x”? Can’t possible check/test for everything, so using set -x can be a good catch all.
Did you mean set -e
? set -x
would just show what's being done.
The scripts have moved to https://github.com/synopsys-sig/synopsys-detect-scripts and changes similar to these should be made available with the release of 5.5.0 of Synopsys-Detect (https://github.com/blackducksoftware/synopsys-detect)
Pull Request template
Link to github issue (if applicable):
215
Changes proposed in this pull request: