I can't make quotes work inside with-exec -- sh -c '<something here with quotes>'
✔ container | from alpine | with-exec -- sh -c 'echo hello world' | stdout 0.0s
hello world
✘ container | from alpine | with-exec -- sh -c 'echo "hello world"' | stdout 0.0s
! function "with-exec": invalid argument "echo \"hello world\"" for "--args" flag: parse error on line 1, column 6: bare " in non-quoted-field
! Usage: with-exec <args> [--use-entrypoint] [--stdin string] [--redirect-stdout string] [--redirect-stderr string] [--expect ReturnType] [--experimental-privileged-nesting] [--insecure-root-capabilities] [--expand] [--no-init]
And if I run this from a dagger script, there is NO error whatsoever and the exit code is 0. Which seems quite misleading...
Is this a bug?
How to work around this? Some env vars point to directories that might have spaces in names. It would be unfortunate if rm got such a variable as an argument... Normally I'd be using quotes around the var, but it doesn't seem to work in dagger shell