Skip to content

Conversation

@iliadsh
Copy link
Member

@iliadsh iliadsh commented Dec 13, 2022

Previously, running a command like
terra gcloud compute ssh --zone us-central1-a jupyter@newenv --command "ps aux"
would fail to parse, as the space information in the quoted part would be lost when the command is built.

Copy link
Contributor

@melissachang melissachang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbookg
Copy link
Contributor

cbookg commented Dec 14, 2022

But double-quotes should work too. Though it doesn't make sense to me that these would be different? The flag parsing library should be providing the underlying value regardless?

@iliadsh
Copy link
Member Author

iliadsh commented Dec 14, 2022

Do single quotes work?

Just tested it with the ssh command and it doesn't appear to work. The dsub example doesn't work as expected either.

@melissachang
Copy link
Contributor

Good point that double quotes should work, and that flag-parsing library (picocli) should handle this.

remkop/picocli#851

https://stackoverflow.com/questions/63629789/how-to-escape-chars-from-string-option

Is it possible to write a test that fails before this PR and passes after this PR?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants