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

Fix values being unquoted #86

Merged
merged 2 commits into from
Jul 11, 2023
Merged

Fix values being unquoted #86

merged 2 commits into from
Jul 11, 2023

Conversation

Fernando-Abreu
Copy link
Collaborator

Fixes #77
Cue library removes quotations from config values. This has caused issues for a customer with a hex string being transformed into a float number.
YQ library doesn't alter quotations by default.

@Fernando-Abreu Fernando-Abreu requested a review from h42zhu July 11, 2023 14:05
@Fernando-Abreu Fernando-Abreu force-pushed the fix-config-quotes-removal branch from 7742e99 to 95d3c5e Compare July 11, 2023 14:55
Comment on lines 58 to 59
awk '{$1=$1};1' \
| awk 'NF {printf "\"%s\" ", $0}' \
Copy link

Choose a reason for hiding this comment

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

These two can be combined, which removes the need for the "hack" of adding the 1 as the action.

Suggested change
awk '{$1=$1};1' \
| awk 'NF {printf "\"%s\" ", $0}' \
awk 'NF {$1=$1; printf "\"%s\" ", $0}' \

src/scripts/generate-config.sh Show resolved Hide resolved
Using Cue library it remove quotation from config values. This has
caused issues for a customer which had a hex string being transformed
to a float number
@Fernando-Abreu Fernando-Abreu force-pushed the fix-config-quotes-removal branch from 95d3c5e to bd4c726 Compare July 11, 2023 15:48
src/scripts/generate-config.sh Show resolved Hide resolved
@Fernando-Abreu Fernando-Abreu merged commit 6fb32db into main Jul 11, 2023
@wyardley wyardley mentioned this pull request Jul 14, 2023
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.

continue-config.yml parses 0 prefixed strings in env vars as numbers
3 participants