Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined local variable or method `stdout' in communicator.rb #4452

Closed
npvisual opened this issue Sep 4, 2014 · 0 comments · Fixed by #4454
Closed

Undefined local variable or method `stdout' in communicator.rb #4452

npvisual opened this issue Sep 4, 2014 · 0 comments · Fixed by #4454

Comments

@npvisual
Copy link

npvisual commented Sep 4, 2014

Environment :

  • Vagrant 1.6.4 running on OSX 10.9.4
  • Vagrant-aws 0.5.0

When I try and provision a VM on AWS using vagrant-aws I get the error below after using the following tag in Vagrantfile (which resolves the tty issue) :

config.ssh.pty = true

/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/communicators/ssh/communicator.rb:573:in `shell_execute': undefined local variable or method `stdout' for #<VagrantPlugins::CommunicatorSSH::Communicator:0x0000010131c110> (NameError)
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/communicators/ssh/communicator.rb:188:in `block in execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/communicators/ssh/communicator.rb:280:in `connect'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/communicators/ssh/communicator.rb:182:in `execute'
    from /Users/nphilipp/.vagrant.d/gems/gems/vagrant-aws-0.5.0/lib/vagrant-aws/action/sync_folders.rb:32:in `call'

There was a recent diff 138aa5a that replaced line 428 :

-        use_tty = false
-        stdout = ''
+        # These variables are used to scrub PTY output if we're in a PTY
+        pty = false
+        pty_stdout = ""

And I believe that line 573 of the current version wasn't updated to use pty_stdout.

npvisual pushed a commit to npvisual/vagrant that referenced this issue Sep 4, 2014
Fixes hashicorp#4452.
The stdout variable was changed during commit
hashicorp@138aa5aad375ac0c076a0e0a3493
e25906ce0434 . This commit just corrects this omission.
mitchellh added a commit that referenced this issue Sep 4, 2014
Fix for issue #4452 : undefined stdout in communicator.rb
@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant