Aborting Cygwin setup in unattended modes

Jon Turney jon.turney@dronecode.org.uk
Sun Jul 21 15:55:06 GMT 2024


On 22/06/2024 07:45, David Allsopp via Cygwin wrote:
> If Cygwin's setup requires input (for example, to select a mirror),
> with --quiet-mode hidden it simply terminates (there's no apparent
> exit status or message, though).
> 
> With --quiet-mode noinput, Cygwin setup sits at the appropriate
> dialog, but it's of course non-responsive.
> 
> Would it be possible in these situations for Cygwin to abort,
> preferably with a non-zero exit code?
> 
> The background to this was running Cygwin setup in GitHub Actions (so
> UI not visible), _without_ specifying --site, where the Cygwin
> installation had been restored by actions/cache but not the registry
> setting in HKLM\SOFTWARE\Cygwin\setup meaning that setup could not
> find setup.rc and consequently determine the last-used mirror. The GUI
> therefore invisibly froze at mirror selection.
> 
> That issue has obviously been fixed, but it would seem sensible that
> Cygwin's setup doesn't ever display a dialog _requiring_ input where
> all that input has been disabled!

Thanks for reporting this!

Oh, this is a weird one:

The '--quiet-mode' implentation is all rather ad-hoc, and so there's 
been no comprehensive audit of the setup code to ensure that all the 
possible places where we potentially stop for interaction are instead 
handled automatically.

But, this is a deliberate choice in some ancient logic, which 
deliberately drops back into attended mode, just in this one specific 
place (when there are no package repository site URLs specified).

Since this seems counter-intuitive and completely unhelpful, I've 
applied a change as you suggest, so we'll stop with an error instead.



More information about the Cygwin mailing list