|
From: | Nevroz Arslan |
Subject: | Re: Pass argument to function |
Date: | Fri, 10 Mar 2023 20:15:13 +0300 |
Hi Brandon,
'capture' and its friends 'run' and 'run*' are macros that treat their
arguments differently from what you would expect from a regular procedure.
Looking at the documentation of '(run COMMAND ...)', you will find that
> COMMAND is also implicitly quasiquoted so subexpressions may be computed at run-time by unquoting them.
which means that COMMAND is passed to the shell as-is, without being
evaluated. So the "not found" error is actually returned by the shell,
since it does not know what 'string-append' is.
In order to evaluate a quasi-quoted _expression_ (or parts of it), you
must unquote it (or the parts in question).
This should work:
(capture ,(string-append "docker inspect " str)))
Hope that helps.
Best wishes,
-utz
[Prev in Thread] | Current Thread | [Next in Thread] |