Hello Catonano, Danny Milosavljevic <[email protected]> writes:
>> So were the spaces the only problem ? > > In > https://gitlab.com/humanitiesNerd/guix-hacks/blob/trytonservice/gnu/services/trytond.scm > , you don't invoke a shell (example: "sh", "bash", "csh" etc) so the > "VARIABLE=VALUE" syntax will not be evaluated by the shell and the > kernel will try to start a program called "VARIABLE=VALUE" instead. > > So either (invoke "sh" "-c" "VARIABLE=VALUE trytond-admin ...") or > just use setenv and then invoke trytond-admin directly. Actually, there is one more way. You can run (I didn't test) (invoke "env" "VAR1=VAL1" ... "VARn=VALn" "trytond-admin" "ARG1" ... "ARGn") But personally I prefer the 'setenv' approach, it looks more schemish to me. In fact, I think we should have a 'with-environment-variables' macro which run the body with the appropriate environment variables set and restore them after we finish, similar to how 'with-directory-excursion' works. Cheers, Alex
