Skip to content

fix(ods-cli): split env diff on first '=' and strip CR/quotes - #2645

Open
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:issue-2297-env-diff-first-eq
Open

fix(ods-cli): split env diff on first '=' and strip CR/quotes#2645
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:issue-2297-env-diff-first-eq

Conversation

@patil2001

Copy link
Copy Markdown
Contributor

Summary

Closes #2297. cmd_preset env comparison used IFS== read which split on every =, truncating JWT/base64 secrets and query-string URLs at the first =. Both sides truncated identically, so real differences after the first = were reported as "no difference".

Change

Split on the first = only and strip trailing CR and matching surrounding quotes, matching lib/safe-env.sh.

Test plan

  • Compared a .env whose values contain embedded =; diff now reports genuine changes.

cmd_preset env comparison used 'IFS== read' which split on every '=',
truncating JWT/base64 secrets and query-string URLs at the first '='.
Both sides truncated identically, so real differences after the first '='
were reported as 'no difference'. Now split on the first '=' only and strip
trailing CR and matching surrounding quotes, matching lib/safe-env.sh.
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.

cmd_preset diff env parsing truncates values at first =

1 participant