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

Fix undefined line variable error in LVM::External #12

Merged
merged 1 commit into from
May 16, 2022

Conversation

wheatevo
Copy link
Contributor

@wheatevo wheatevo commented Apr 27, 2022

Description

This is a regression that was introduced in commit
9e73c28. The change is a simple fix
to ensure the line variable is defined at the time it is accessed.

Signed-off-by: Matthew Newell [email protected]

Issues Resolved

Fixes #10

Current Behavior

require 'lvm'
LVM::VERSION
 => "0.4.1"

lvm = LVM::LVM.new
/usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm/external.rb:12:in `block in cmd': undefined local variable or method `line' for LVM::External:Module (NameError)
        from /usr/share/rvm/gems/ruby-3.0.2/gems/open4-0.9.6/lib/open4.rb:68:in `popen4'
        from /usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm/external.rb:11:in `cmd'
        from /usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm.rb:51:in `raw'
        from /usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm.rb:68:in `userland'
        from /usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm.rb:62:in `version'
        from /usr/share/rvm/gems/ruby-3.0.2/gems/chef-ruby-lvm-0.4.1/lib/lvm.rb:35:in `initialize'
        from (irb):3:in `new'
        from (irb):3:in `<main>'
        from /usr/share/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.5/exe/irb:11:in `<top (required)>'
        from /usr/share/rvm/rubies/ruby-3.0.2/bin/irb:23:in `load'
        from /usr/share/rvm/rubies/ruby-3.0.2/bin/irb:23:in `<main>'

New Behavior

require 'lvm'
LVM::VERSION
 => "0.4.2"

lvm = LVM::LVM.new
 =>
#<LVM::LVM:0x000055f368c42190
...

Check List

This is a regression that was introduced in commit
9e73c28. The change is a simple fix
to ensure the line variable is defined at the time it is accessed.

Fixes sous-chefs#10

Signed-off-by: Matthew Newell <[email protected]>
@wheatevo wheatevo marked this pull request as ready for review April 27, 2022 15:35
@wheatevo
Copy link
Contributor Author

@damacus

This change includes the version bump to 0.4.2, let me know if you would prefer that to be left out of this PR.

@Soulou
Copy link

Soulou commented May 2, 2022

We're also impacting by this issue, so I'm sending this comment as a "up". Can't wait to see it released. Thanks a lot.

@damacus damacus merged commit a9af934 into sous-chefs:main May 16, 2022
@damacus
Copy link
Member

damacus commented May 16, 2022

Sorry this got buried by all the other 100+ GitHub notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

undefined local variable or method `line' for LVM::External:Module
3 participants