swiftDialog icon indicating copy to clipboard operation
swiftDialog copied to clipboard

Empty variables as parameters cause no window to be drawn on dialog test build 3.0.0.4812

Open BigMacAdmin opened this issue 6 months ago • 2 comments

Describe the bug On build 3.0.0.4812 a command that includes an empty argument causes dialog to hang and not draw a window

To Reproduce

unset testVar
/usr/local/bin/dialog --title "test" "$testVar"

or

testVar=''
/usr/local/bin/dialog --title "test" "$testVar"

Same if we use testVar= as well. Because "$testVar" is wrapped in quotes, as discussed on slack, dialog is seeing this as an empty argument that does not start with a - and so is not being processed properly

Expected behavior Previous versions ignored these empty arguments, and if we could regain that behavior this would be much appreciated

Screenshots n/a

Desktop (please complete the following information):

  • macOS version 26.0RC1
  • swiftDialog version 3.0.0.4812

Additional context This affects Renew and may also affect Baseline (need more testing)

BigMacAdmin avatar Sep 13 '25 03:09 BigMacAdmin

There are some limitations with regard to how SwiftUI build with Xcode 16 or later behave that will be difficult to get around, however I can look at /usr/local/bin/dialog and have it discard null or empty arguments.

bartreardon avatar Sep 14 '25 23:09 bartreardon

I've made improvements to Renew to get around this problem, so if you don't plan to fix it feel free to close this issue.

BigMacAdmin avatar Sep 18 '25 16:09 BigMacAdmin