Skip to content

Commit

Permalink
Merge pull request #616 from ekohl/add-command-method
Browse files Browse the repository at this point in the history
Add a command method in Command
  • Loading branch information
mizzy authored Jun 24, 2021
2 parents 73b1b72 + 2e7e24a commit 611d1e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/serverspec/type/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ def exit_status
command_result.exit_status.to_i
end

protected
def command
@name
end

private
def command_result()
@command_result ||= @runner.run_command(@name)
@command_result ||= @runner.run_command(command)
end
end
end

0 comments on commit 611d1e7

Please sign in to comment.