Double quote array expansion to prevent splitting#69
Double quote array expansion to prevent splitting#69haogang merged 7 commits intounitycatalog:mainfrom
Conversation
|
@ravivj-db can you review this since you added this code? |
|
@abrassel @ravivj-db are these changes still needed or relevant? |
|
These are lint fixes. Not super important but intellij will complain about them. |
|
@creechy - I made the changes. Let me know if you want additional testing! |
|
Hm, looks like tests failed. Will investigate |
|
@creechy heads up - when I run the |
I think you have discovered a latent bug in the tarball test. Creating a catalog with a space in it, like |
I'll give this a try. Update: Gave it a try and it doesn't quite work. We have some command line arguments for which spaces are valid. I.e. In this case |
| # 5. Run and verify CLI | ||
| try: | ||
| cli_cmd = [os.path.join(bin_dir, "uc"), "catalog", "create", "--name", "Test Catalog"] | ||
| cli_cmd = [os.path.join(bin_dir, "uc"), "catalog", "create", "--name", "Test_Catalog"] |
There was a problem hiding this comment.
I don't think we should change this test case. Are commands args with spaces not working?
There was a problem hiding this comment.
UC does not allow objects with spaces in their name, so the test with the space in the name should be failing, and now is failing with @abrassel 's double quote changes, which is why I asked him to change this test. I don't know why this test is currently successful before this PR but I believe it should be failing.
bin/uc
Outdated
| # echo "Quoted arguments: $quoted_args_str" | ||
| # echo "Running command: $CLI_JAVA_COMMAND" | ||
| eval $CLI_JAVA_COMMAND $@ || exit | ||
| eval "$CLI_JAVA_COMMAND" "$@" || exit |
There was a problem hiding this comment.
@abrassel I took a look at why the tutorial tests are failing, I think it's due to this line. Not sure why the eval was used in the first place but I think if you remove it and make the line $CLI_JAVA_COMMAND "$@" || exit that should fix things. Can you give it a try? There might be a way to make the eval work but this now makes sense why all the args are being wrapped in quotes before being passed here.
|
@abrassel could we please make any changes needed to this PR? (please feel free to close if this isn't an issue anymore) |
|
hi @vikrantpuppala , been a bit distracted with some other work lately; I apologize for the delay. Taking a look now |
f29e173 to
b35ee87
Compare
|
@vikrantpuppala @creechy i think we are good to go. |
|
@haogang this is ready to merge. |
PR Checklist
docsis updatedDescription of changes
https://github.com/koalaman/shellcheck/wiki/SC2068
Testing Changes