Skip to content

Fix stderr redirections for git commands on Windows#62

Open
JacobusXIII wants to merge 2 commits intoaerius:mainfrom
JacobusXIII:stderr_redirect_fix
Open

Fix stderr redirections for git commands on Windows#62
JacobusXIII wants to merge 2 commits intoaerius:mainfrom
JacobusXIII:stderr_redirect_fix

Conversation

@JacobusXIII
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@BertScholten BertScholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

curr_dir = Dir.pwd
Dir.chdir(dir)
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' 2>/dev/null'
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' ' + git_stderr_null
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' ' + git_stderr_null
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + "#{args} #{git_stderr_null}"

Assuming this works as well, but might want to test it ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested it; that doesn't work ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' ' + git_stderr_null
cmd = "#{$git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\""} #{args} #{git_stderr_null}"

A this one @eltee1?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this works; build continues ;)

Copy link
Copy Markdown
Contributor

@eltee1 eltee1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested change, works like a charm !
LGTM ;)

curr_dir = Dir.pwd
Dir.chdir(dir)
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' 2>/dev/null'
cmd = ($git_bin_path.to_s.empty? ? 'git' : "\"#{$git_bin_path}git\"") + ' ' + args + ' ' + git_stderr_null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested it; that doesn't work ;)

Copy link
Copy Markdown
Member

@BertScholten BertScholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@eltee1 eltee1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm ;)

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.

3 participants