flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

flameshot gui --last-region: ERRORCODE falsely always "0"

Open freeo opened this issue 6 months ago • 0 comments

Flameshot Version

Flameshot v12.1.0 (3d21e496) Compiled with Qt 5.15.11

Installation Type

User repository (AUR)

Operating System type and version

Arch, btw

Description

I'm using flameshot gui --last-region in a script. I need to handle errors, which is cumbersome without a proper ERRORCODE. Flameshot just always exits ERRORCODE = 0 which means "OK".

Expected behaviour: When flameshot exits with flameshot: error: ... in its output, it should exit with an $? !=0 ERRORCODE.

Steps to reproduce

$ flameshot gui --last-region --accept-on-select --path ~/Pictures/flameshots/

flameshot: error: Invalid path, must be an existing directory or a new file in an existing directory
flameshot: error: Invalid path, must be an existing directory or a new file in an existing directory.
See flameshot --help.
$ echo $?
0

Screenshots or screen recordings

No response

System Information

Arch, Xorg

freeo avatar Jul 27 '24 11:07 freeo