Additional information (Fixed/Move/Update?):
 
Examining bug further, it seems that the bug only affects certain circumstances such as subshell. For example:

user@pc: zenity --question --title="title" --ok-label="Yes" --cancel-label="No" --text="Text"
# Click Yes
user@pc: echo $?
0
 
user@pc: zenity --question --title="title" --ok-label="Yes" --cancel-label="No" --text="Text"
# Click No
user@pc: echo $?
1
 
### However ###
 
user@pc: aa=$(zenity --question --title="title" --ok-label="Yes" --cancel-label="No" --text="Text")
# Click Yes
user@pc: echo $aa
# Returns \n\n
 
user@pc: aa=$(zenity --question --title="title" --ok-label="Yes" --cancel-label="No" --text="Text")
# Click No
user@pc: echo $aa
# Returns \n\n
 
### Finally ###
 user@pc: zenity --question --title="title" --ok-label="Yes" --cancel-label="NO" --text="Delete $1"; echo "$?"
# Click Yes
0
 
user@pc: zenity --question --title="title" --ok-label="Yes" --cancel-label="NO" --text="Delete $1"; echo "$?"
# Click No
1
 
user@pc: zenity --question --title="title" --ok-label="Yes" --cancel-label="NO" --text="Delete $1" && echo "$?"
# Click Yes
# Returns \n
 
user@pc zenity --question --title="title" --ok-label="Yes" --cancel-label="NO" --text="Delete $1" && echo "$?"
# Click No
0
 
### Conclusion ###
 
Zenity does not output a return value reliably for scripting.
However, knowing this, it is easy to script around it without further conflict.
 
Possibly closed and moved to Wishlist: Please make Zenity more consistent?
 
J
 

Reply via email to