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

unclear what --json does when running ftl config set #3408

Open
mistermoe opened this issue Nov 15, 2024 · 1 comment
Open

unclear what --json does when running ftl config set #3408

mistermoe opened this issue Nov 15, 2024 · 1 comment
Labels
triage Issue needs triaging

Comments

@mistermoe
Copy link
Member

Repro

❯ ftl config set --json echo.default '{ "name": "beepboop"  }'
ftl: error: unknown: JSON validation failed: default has wrong type, expected String found map[string]interface {}
❯ ftl config set --json echo.default "{\"name\": \"beepboop\"}"
ftl: error: unknown: JSON validation failed: default has wrong type, expected String found map[string]interface {}
❯ ftl config set --db --json echo.default '"{\"name\": \"beepboop\"}"'

Note

Finally! But yuck

❯ ftl config get echo.default
"{\"name\": \"beepboop\"}"
❯ ftl config set --db echo.default '{"name": 3}'
❯ ftl config get echo.default
"{\"name\": 3}"
@github-actions github-actions bot added the triage Issue needs triaging label Nov 15, 2024
@ftl-robot ftl-robot mentioned this issue Nov 15, 2024
@alecthomas
Copy link
Collaborator

The error is correct, but could perhaps be clearer... --json is for specifying strongly typed values, the FTL type is String and you're trying to put a map into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants