Boost logo

Boost-Build :

Subject: Re: [Boost-build] Unexpected line feed when capturing shell output
From: Martin Dyring-Andersen (mda_at_[hidden])
Date: 2015-09-19 17:57:22


Hi Brian,

> maybe?
> echo -n `git rev-parse --abbrev-ref HEAD`
>
> It works on cmd line, not sure about within jam file...

I ended up with this, which seems to work as expected.. Thanks for pointing me in right direction, I thought it was a bug that linefeed was captured.

local GIT_BRANCH = [ SHELL "git rev-parse --abbrev-ref HEAD | tr -d '\n'" ] ;
echo "before$(GIT_BRANCH)after" ;

BR,
Martin


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk