Bug: Unable to set a multi-line environment variable with age #6878
Unanswered
Dremora
asked this question in
Troubleshooting and bug reports
Replies: 1 comment
-
|
I had this same problem. I was able to work around it by creating a file with the contents of the private key, then using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It’s currently not possible to set a multi-line environment variable (e.g., an SSH private key) when using age. (I haven't tried without age).
When providing the value directly (via CLI argument or prompt), newlines are not handled correctly.
Steps to Reproduce
Case 1: Direct string with
\nResult:
The value is stored literally with
\nsequences instead of actual newlines.Case 2:
--promptwith literal newlinesResult:
Only the first line of input is stored; the rest is discarded.
Case 3:
--promptwith escaped\nResult:
The
\nsequences are preserved literally, not converted to newlines.Expected Behavior
Mise should correctly handle multi-line input and preserve actual newline characters in the environment variable value—whether input is provided as a direct argument, through
--prompt, or includes escaped\nsequences.Environment
2025.11.1Beta Was this translation helpful? Give feedback.
All reactions