mirror of
https://github.com/inspec/inspec
synced 2024-11-26 06:30:26 +00:00
Fix git fetcher error detection logic (#3665)
Signed-off-by: Noel Georgi <git@frezbo.com>
This commit is contained in:
parent
f873e60309
commit
5d87b8f94b
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ module Fetchers
|
|||
def resolve_ref(ref_name)
|
||||
command_string = "git ls-remote \"#{@remote_url}\" \"#{ref_name}*\""
|
||||
cmd = shellout(command_string)
|
||||
raise "Error running '#{command_string}': #{cmd.stderr}" unless cmd.stderr == ''
|
||||
raise "Error running '#{command_string}': #{cmd.stderr}" unless cmd.exitstatus == 0
|
||||
ref = parse_ls_remote(cmd.stdout, ref_name)
|
||||
if !ref
|
||||
raise "Unable to resolve #{ref_name} to a specific git commit for #{@remote_url}"
|
||||
|
|
Loading…
Reference in a new issue