Use IO#gets instead of Kernel#gets #287

Merged
merged 1 commit into from Oct 26, 2013

Conversation

Projects
None yet
2 participants
@takai
Contributor

takai commented Oct 25, 2013

serverspec-init command raises error when passing an argument because Kernel#gets read ARGF.

% bin/serverspec-init read_from_argf
Select OS type:

  1) UN*X
  2) Windows

Select number: /Users/naoto-takai/Src/external/serverspec/lib/serverspec/setup.rb:55:in `gets': No such file or directory - read_from_argf (Errno::ENOENT)
        from /Users/naoto-takai/Src/external/serverspec/lib/serverspec/setup.rb:55:in `gets'
        from /Users/naoto-takai/Src/external/serverspec/lib/serverspec/setup.rb:55:in `ask_os_type'
        from /Users/naoto-takai/Src/external/serverspec/lib/serverspec/setup.rb:8:in `run'
        from bin/serverspec-init:7:in `<main>'

@mizzy mizzy merged commit bf3c10c into mizzy:master Oct 26, 2013

1 check passed

default The Travis CI build passed
Details
@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Oct 26, 2013

Owner

Thanks!

Owner

mizzy commented Oct 26, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment