infrablocks / ruby_terraform

A simple Ruby wrapper for invoking terraform commands.
MIT License
109 stars 33 forks source link

Command not exiting #34

Closed sho918 closed 4 years ago

sho918 commented 4 years ago

RubyTerraform command not exiting after terraform execute. Terraform command itself seems to be running correctly.

Need to any settings?

$ git clone git@github.com:infrablocks/ruby_terraform.git
$ cd ruby_terraform
$ ruby -v
ruby 2.4.7p357 (2019-08-28 revision 67796) [x86_64-darwin18]

# RubyTerraform version v0.40.0
$ bin/setup
$ bin/console
irb(main):001:0> RubyTerraform::VERSION
=> "0.40.0"
# Command not exit, an error occurs if press Enter
irb(main):002:0> RubyTerraform.init
Terraform initialized in an empty directory!

The directory has no Terraform configuration files. You may begin working
with Terraform immediately by creating Terraform configuration files. 

Errno::EPIPE: Broken pipe
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:247:in `write'
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:247:in `<<'
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:247:in `block in relay'
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:255:in `relay'
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:346:in `block (4 levels) in spawn'
    from /Users/sho/.rbenv/versions/2.4.7/lib/ruby/gems/2.4.0/gems/open4-1.3.4/lib/open4.rb:188:in `block (2 levels) in run'

# RubyTerraform version v0.26.0
$ git checkout -b v0.26.0 refs/tags/v0.26.0
$ bin/setup
$ bin/console
irb(main):001:0> RubyTerraform::VERSION
=> "0.26.0"
# Command exiting
irb(main):002:0> RubyTerraform.init
Terraform initialized in an empty directory!

The directory has no Terraform configuration files. You may begin working
with Terraform immediately by creating Terraform configuration files.
=> nil
tobyclemson commented 4 years ago

Hi there,

Thanks for raising this, I'll investigate this weekend.

Toby

tobyclemson commented 4 years ago

Hi again,

This is fixed in version 0.42.0.

Thanks, Toby

sho918 commented 4 years ago

Thank you for quick fix!