Skip to content

Commit 9959d47

Browse files
committed
Add stderr to error message in GClone spec searcher
This fixes a bug in the `GClone` spec searcher that was adding the contents of stdout to the error message raised when cloning the git repository fails. Now, the contents of stderr are added to the error message.
1 parent d3c27fd commit 9959d47

File tree

1 file changed

+1
-1
lines changed
  • lib/puppetfile-resolver/spec_searchers/git

1 file changed

+1
-1
lines changed

lib/puppetfile-resolver/spec_searchers/git/gclone.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def self.clone_and_read_file(url, ref, file, config)
5757
clone_cmd.push("--branch=#{ref}") if ref != 'HEAD'
5858
clone_cmd.push(url, dir)
5959
out, err_out, process = ::PuppetfileResolver::Util.run_command(clone_cmd)
60-
err_msg += out
60+
err_msg += err_out
6161
raise err_msg unless process.success?
6262
Dir.chdir(dir) do
6363
content, err_out, process = ::PuppetfileResolver::Util.run_command(['git', 'show', "#{ref}:#{file}"])

0 commit comments

Comments
 (0)