Skip to content

Commit

Permalink
Fix pathing for go on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Maslanka <maslanka@progress.com>

Fix condition logic

Signed-off-by: Michael Maslanka <maslanka@progress.com>

Fix if condition

Signed-off-by: Michael Maslanka <maslanka@progress.com>
  • Loading branch information
mimaslanka committed Aug 12, 2021
1 parent 999a4e0 commit a078f32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/omnibus/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ def compiler_safe_path(*pieces)
#
def go(command, options = {})
build_commands << BuildCommand.new("go `#{command}'") do
bin = embedded_bin("go")
bin = windows? ? windows_safe_path("#{install_dir}/embedded/go/bin/go") : embedded_bin("go")

# Check if we are building a go binary and then check if we are on
# Red Hat or CentOS so we build the binary properly with a build-id
if command.start_with?("build", " build") && (rhel? || centos?)
if command.start_with?("build", " build") && rhel?
command << " -ldflags=-linkmode=external"
end

Expand Down

0 comments on commit a078f32

Please sign in to comment.