Open asashnov opened 5 years ago
I did some testing (with a Mini BLE), and apparently only the last case Getting "moolticute ssh keys" wasn't confirmed
is indistinguishable from the missing file.
The other cases send a mp_disconnected
or status_changed
message and could be better handled to return some other exit code (I have a prototype here: https://git.sr.ht/~oliverpool/go-moolticute/tree/main/item/client.go)
"mc-agent cli -c list" should not return exit code 0 on error
Currently
mc-agent cli -c list
always returns exit code 0, even there is some error, so Mooltipass GUI, SSH Keys tab can't distinct empty list of keys from any error occured.Actual result:
Now exit code is always 0 no matter what:
Expected result:
Exit code should be non-zero in a case of any error. Moolticute GUI, "SSH Keys" tab should show an error if SSH Keys was not loaded from a device.
Only absence of "moolticute ssh keys" file is a normal situation and exit code should be 0 if there is no such file on a Mooltipass device (mc-agent wasn't used yet).