Hi! Lars-Dominik Braun <[email protected]> writes:
> hm, I feel that’s unnecessarly complex with lots of if’s and else’s.
Maybe you misunderstood what I'm trying to do. I'd like to avoid shell
code just to check if the profile root exists before deciding which Guix
command to run.
In other words, I'd like a exexv'able command instead of having to wrap
if with some shell code.
Currently from Emacs, if I must use `call-process` to switch to the environment,
then I must wrap if with some shell code, e.g.
--8<---------------cut here---------------start------------->8---
(call-process
"guix" nil nil nil
"bash" "-c"
"if [ -f ... ]; then
guix environment --profile=...
else
guix environment --root=...
fi")
--8<---------------cut here---------------end--------------->8---
which is more cumbersome and requires brittle shell-escapes compared to
--8<---------------cut here---------------start------------->8---
(call-process
"guix" nil nil nil
"environment" "--profile=..." ...)
--8<---------------cut here---------------end--------------->8---
Does that make sense?
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
