bacongravy / macinbox

Puts macOS in a Vagrant box
Other
662 stars 45 forks source link

NoTTY error when using ansible #25

Closed egandro closed 5 years ago

egandro commented 5 years ago

I am using ansible to run macinbox.

However there is a problem.

It fails in lib/macinbox/task.rb:19

columns = STDOUT.winsize[1] - 8 # there is no winsize on a noTTY

I suggest adding a "--silent" option or detecting if it's a notty.

egandro commented 5 years ago

I just learned a bad thing. It seams the OSX installer needs to have a UI present.

For some reasons I can't install via SSH :(

Maybe some of you guys will find out how - I will now do a full UI Login via ansible.

bacongravy commented 5 years ago

Hi, @egandro! Thanks for your interest in macinbox.

It seems reasonable to me for macinbox to attempt to detect when there is no TTY and not use TTY features in that case. I'll look into that. However, it sounds like that wouldn't be sufficient to make macinbox work from an ssh session, based on your followup.

Can you try running with the --debug flag and letting me know what error messages you're getting from the installer?

egandro commented 5 years ago

I have a solution :) but this really bugs your head.

1) Do a login via VNC to enable the Desktop to mac

2) open -a "Terminal" ./myshellscript.sh

Stupid systems needs desperate measures...

bacongravy commented 5 years ago

See PR #33 for a workaround.

bacongravy commented 5 years ago

Fixed with https://github.com/bacongravy/macinbox/commit/2cf934208bee948532ce69542b25735918a79093.

bacongravy commented 5 years ago

Tagged and released: https://github.com/bacongravy/macinbox/tree/v3.3.0