Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI parse errors for quoted strings #157

Closed
6 tasks done
vinckr opened this issue Mar 23, 2022 · 0 comments · Fixed by ory/x#483
Closed
6 tasks done

CLI parse errors for quoted strings #157

vinckr opened this issue Mar 23, 2022 · 0 comments · Fixed by ory/x#483
Labels
bug Something is not working.

Comments

@vinckr
Copy link
Member

vinckr commented Mar 23, 2022

Preflight checklist

Describe the bug

Not all of the examples displayed in the CLI help are working:

Examples:
ory patch project ecaaa3cb-0730-4ee8-a6df-9553cdfeef89 \
	--replace '/name="My new project name"' \
	--add '/services/identity/config/courier/smtp={"from_name":"My new email name"}' \
	--replace '/services/identity/config/selfservice/methods/password/enabled=false' \
	--delete '/services/identity/config/selfservice/methods/totp/enabled'

the --replace and --add examples that have "quoted" strings in them lead to a parse error. the other examples work fine.

Reproducing the bug

ory patch project 650fbb1c-a376-45a2-b56c-cdf1ec2d1c74 \
	--add '/services/identity/config/courier/smtp={"from_name":"My new email name"}'

leads to

invalid argument "/services/identity/config/courier/smtp={\"from_name\":\"My new email name\"}" for "--add" flag: parse error on line 1, column 41: bare " in non-quoted-field

ory patch project 650fbb1c-a376-45a2-b56c-cdf1ec2d1c74 \
	--add "/services/identity/config/courier/smtp={\"from_name\":\"My new email name\"}"

leads to

invalid argument "/services/identity/config/courier/smtp={\"from_name\":\"My new email name\"}" for "--add" flag: parse error on line 1, column 41: bare " in non-quoted-field

similar with the --replace flag

ory patch project 650fbb1c-a376-45a2-b56c-cdf1ec2d1c74 \
	--replace '/name=NewName'

leads to

invalid argument "/name=\"NewName\"" for "--replace" flag: parse error on line 1, column 7: bare " in non-quoted-field

Relevant log output

No response

Relevant configuration

No response

Version

not sure if this makes sense here

On which operating system are you observing this issue?

Ory Cloud

In which environment are you deploying?

Ory Cloud

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant