The exit code will always be from the pipe operation, not from the is-connected
command. Should be:
$ snapctl is-connected camera; echo $?
1
Full credit to @jamesh, see Snapctl is-connected command not working - #2 by jamesh
The exit code will always be from the pipe operation, not from the is-connected
command. Should be:
$ snapctl is-connected camera; echo $?
1
Full credit to @jamesh, see Snapctl is-connected command not working - #2 by jamesh