Frederick888 / git-credential-keepassxc

Helper that allows Git (and shell scripts) to use KeePassXC as credential store
GNU General Public License v3.0
196 stars 8 forks source link

Exit code of `ERRO ... is not allowed to call git-credential-keepassxc` is `0` #54

Closed stdedos closed 2 years ago

stdedos commented 2 years ago
Oct 27 13:53:07.667 ERRO /usr/bin/dash (uid=1000, gid=1000) is not allowed to call git-credential-keepassxc, Caused by: N/A
Out[1]: CompletedProcess(args='echo "url=https://gitlab.com/-/profile/personal_access_tokens" | git-credential-keepassxc get | grep password | cut -d= -f 2', returncode=0, stdout='')

I'd say this should be non-zero (and maybe not a catch-all 1).

That also goes for other issues:

Frederick888 commented 2 years ago

Is this PowerShell or something I'm looking at? 'Caller not allowed' does return 1 instead of zero. I'm not sure what shell you were using and its behaviour, but in a POSIX shell, usually set -o pipefail is required otherwise cut's exit code overrides those of grep and git-credential-keepassxc.

And there is currently no plan to support other exit codes. See also #42.

stdedos commented 2 years ago

Is this PowerShell or something I'm looking at?

ipython. A python script needs/is asking for the token ...

Oh yeah - de pipez :sweat: My bad. "I didn't write the pipe, so there must be no pipe" ...