[PATCH consfigurator v2 1/2] GPG: batch mode and return *ERROR-OUTPUT* in conditions
Sean Whitton
spwhitton at spwhitton.name
Tue Oct 4 23:13:26 BST 2022
Hello,
On Tue 04 Oct 2022 at 10:51PM +02, Russell Sim wrote:
> Regarding the patch as a whole, while reviewing the rest of the packages
> in the DATA section, it looks like RUN-PROGRAM is used a lot and in all
> cases stderr is discarded.
>
> Would it be reasonable to expand the scope of this work to
>
> Make a utility called RUN-PROGRAM that internally calls
Let's give it its own name.
> UIOP:RUN-PROGRAM, but will capture any STDOUT/STDERR if no streams are
> passed in. Handle the SUBPROCESS-ERROR and convert it to a RUN-FAILED
> condition for all cases. There is only one function
> TRY-GET-FILE-MIME-TYPE that deals directly with the SUBPROCESS-ERROR
> condition so I can update it to handle RUN-FAILED. There will probably
> be a few places then where we need to explicitly pass in *ERROR-OUTPUT*
> or *STANDARD-OUTPUT* rather than that being the default output location?
Not sure what you mean about *{STANDARD,ERROR}-OUTPUT*.
> (or perhaps call the UIOP:RUN-PROGRAM directly) Does this make sense?
> then we can expose RUN-PROGRAM to other packages to consume, giving them
> all the same behaviour.
Yes, makes sense to me. The benefit is basically just better error
messages for data sources, right? I wouldn't want to extend this
outside of data sources for the time being.
> Sorry this patch keeps changing, I'm trying to avoid refactoring large
> amounts of code if it's not needed. But I have learned a lot since I
> started down this path.
No problem!
--
Sean Whitton
More information about the sgo-software-discuss
mailing list