sttz / install-unity

Script to install Unity 3D versions from the command line on macOS
MIT License
131 stars 25 forks source link

Automation: add quiet mode/reduce stdout #21

Closed adm-romanb closed 5 years ago

adm-romanb commented 5 years ago

I'm trying to manage Unity version on mac hosts via Teamcity. I added build step with command "sudo install-unity -y install %version%" and got next error:

The value must be greater than or equal to zero and less than the console's buffer size in that dimension. Parameter name: top Actual value was -5.

Also each time I try to redirect install-unity output using ">" or "less" I get that error. I was said that the download progress causes it, so I hope it's possible to make a simple output without progress bars/etc. Thanks.

sttz commented 5 years ago

Thanks for pointing this out, the exception seems to be coming from drawing the progress bar.

For now, you can disable the progress bar and then it should work:

install-unity install %version% -y --opt progressBar=false

(Note that due to a bug in the arguments parser, the --opt needs to be at the end.)

It makes sense to add a quiet option that also disables the progress bar. I'll also fix the error so that it will work anyway.

adm-romanb commented 5 years ago

--opt progressBar=false really helps. Thanks!

sttz commented 5 years ago

Great! Reopening this to track progress on fixing the exception.

sttz commented 5 years ago

This should now just work in version 2.3.0.

I also fixed the instances where it would try to prompt for input and just hang if there's no terminal attached. Now it'll show an error explaining what needs to be done and exit.