Boost logo

Boost-Build :

Subject: Re: [Boost-build] string manipulation
From: aaron_at_[hidden]
Date: 2016-10-13 16:30:40

> Thanks, that works. How can I capture errors using the SHELL command,
> i.e. handle cases where `path/to/`either returns an error or
> writes to stderr (or both) ?
There isn't a way to get the stderr, but you can have the exit code returned by passing
"exit-status" as an optional parameter. This will return a list of two items: the stdout and
the error code
local result = [ SHELL path/to/ : strip-eol exit-status ] ;
local output = $(result[1]) ;
local status = $(result[2]) ;
This option is documented here:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at