Closed djmb closed 4 days ago
No this won't work.
The dotenv
gem needs the escaped output from kamal secrets fetch
function correctly - it's not behaving exactly the same as a shell would. Escaping the output of the "inlined" kamal secrets commands kind of works around that, but it means that the inlined commands don't work the same a a non inlined version would.
So the problem here is that dotenv and the shell are out of sync. I think maybe the best thing to do is add a kamal secrets print
command that can be used when debugging secrets so you don't need to run the commands directly from the command line.
Closing in favour of https://github.com/basecamp/kamal/pull/1009
Kamal "inlines" calls to
kamal secrets
in the dotenv file, but the results of the calls were not being escaped properly. To "fix" thiskamal secrets fetch
escaped the JSON string before returning it.The two errors cancelled out, but it meant that the commands didn't work from a shell.
To fix, we'll escape the inline command results and remove the escaping from
kamal secrets fetch
.Fixes https://github.com/basecamp/kamal/issues/1007