Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

How to properly escape strings starting with "--" #235

Closed
jlewi opened this issue Dec 16, 2017 · 4 comments
Closed

How to properly escape strings starting with "--" #235

jlewi opened this issue Dec 16, 2017 · 4 comments

Comments

@jlewi
Copy link

jlewi commented Dec 16, 2017

My component is parameterized by a string args that will be a comma separated list of strings corresponding to container args.

I can't seem to properly escape this when trying to set via the command line.

$ ks param set myjob8 args '--arg1=2,--arg2=3'
ERROR unknown flag: --arg1
$ ks param set myjob8 args "--arg1=2,--arg2=3"
ERROR unknown flag: --arg1

Am I not escaping it correctly or is this an issue with how command line arguments are processed?

@jessicayuen
Copy link
Contributor

Can you try: ks param set myjob8 args \'--arg1=2,--arg2=3\'?

@jlewi
Copy link
Author

jlewi commented Dec 16, 2017

That works but introduces an extra set of quotes.

    "myjob8": {
      args: "'--arg1=2,--arg2=3'",
    },

@bryanl
Copy link
Member

bryanl commented Jan 5, 2018

You could try ks param set myjob8 args -- --arg1=2,--arg2=3

@jlewi
Copy link
Author

jlewi commented Jan 5, 2018

You could try ks param set myjob8 args -- --arg1=2,--arg2=3
That worked thank you.

@jlewi jlewi closed this as completed Jan 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants