Using option --init-script together with --gui?

Is it not intended to use option --init-script together with --gui? If I do so, the --init-script part is ignored in the GUI (,but works perfect in the command line).

if you run gradle with --gui and --init-script in command line, --init-script will be ignored.
If you run gradle tasks with --init-script in GUI, it won’t be ignored.



println 'init script'


apply plugin: 'base'

task fooBar << {
  println 'foo-bar'



Is there any reason for this different behavior? My use case is to start from the command line (batch file). The possibility in the GUI is not useful for my use case.

My workaround right now is to copy my init files into USERHOME/.gradle/init.d and start with option --gui.

I just don’t see any restrictions in the syntax of the gradle command, that the two options --gui and --init-script should not be used together from the command line.