`pass git` exit code

robpilling at gmail.com robpilling at gmail.com
Wed Jun 24 22:23:53 CEST 2020


That's a fair point - my main reason for doing it this way was that I 
imagined exiting with the same code as the git command would be more 
useful, so users can treat `pass git [...]` as a transparent wrapper, 
particularly for commands that specify specific exit codes. Happy to 
change it if people would prefer the consistent use of die() / exit code 
of 1.

Rob


On Fri, 19 Jun 2020, Milan Andric wrote:

> It seems weird to exit with an or (||) in the same block with a die? Better
> to set exit on error flag and trap those signals then call die?
>
> Milan
>
> On Thu, Jun 18, 2020, 5:49 PM Rob <robpilling at gmail.com> wrote:
>
>> Hello,
>>
>> I found while using `pass` that git commands have their exit code dropped,
>> so
>> if I ran something like, `pass git fetch && pass git merge @{u} && exit`,
>> if
>> the fetch failed, the subsequent commands would still run. This patch exits
>> with git's error code if we see a git sub-command fail.
>>
>> Many thanks,
>> Rob
>>
>


More information about the Password-Store mailing list