mirror of
https://codeberg.org/gaschz/passff-host.git
synced 2025-06-06 18:08:46 +02:00
grepMetaUrls: do not send stderr output on success, fix #81
This commit is contained in:
parent
daef53be0d
commit
05c39de18b
@ -127,11 +127,21 @@ if __name__ == "__main__":
|
|||||||
# Run and communicate with pass script
|
# Run and communicate with pass script
|
||||||
proc = subprocess.run(cmd, **proc_params)
|
proc = subprocess.run(cmd, **proc_params)
|
||||||
|
|
||||||
|
responseMessage = {
|
||||||
|
"exitCode": proc.returncode,
|
||||||
|
"stdout": proc.stdout.decode(CHARSET),
|
||||||
|
"stderr": proc.stderr.decode(CHARSET),
|
||||||
|
"version": VERSION
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
responseMessage["exitCode"] == 0
|
||||||
|
and opt_args[0] == "grep"
|
||||||
|
):
|
||||||
|
# GPG debug outputs for `grep` over the whole password store
|
||||||
|
# can easily exceed the size limit for native messages (1 MB).
|
||||||
|
# In case of exit code 0, they are not used anyways.
|
||||||
|
responseMessage["stderr"] = ""
|
||||||
|
|
||||||
# Send response
|
# Send response
|
||||||
sendMessage(
|
sendMessage(encodeMessage(responseMessage))
|
||||||
encodeMessage({
|
|
||||||
"exitCode": proc.returncode,
|
|
||||||
"stdout": proc.stdout.decode(CHARSET),
|
|
||||||
"stderr": proc.stderr.decode(CHARSET),
|
|
||||||
"version": VERSION
|
|
||||||
}))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user