Skip to content

Commit

Permalink
Merge pull request #350 from stan-confluent/install-name-tool
Browse files Browse the repository at this point in the history
fix: set install_name to absolute path for libpact_ffi.dylib (#345)
  • Loading branch information
mefellows authored Oct 3, 2023
2 parents b9e9a47 + 5cef32c commit 4fde79c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func (i *Installer) installDependencies() error {
return err
}

err = setOSXInstallName(dst, info.libName)
err = setOSXInstallName(dst)

if err != nil {
return err
Expand Down Expand Up @@ -289,8 +289,9 @@ func (i *Installer) updateConfiguration(dst string, pkg string, info packageInfo
return i.config.writeConfig(c)
}

var setOSXInstallName = func(file string, lib string) error {
cmd := exec.Command("install_name_tool", "-id", fmt.Sprintf("%s.dylib", lib), file)
var setOSXInstallName = func(file string) error {
cmd := exec.Command("install_name_tool", "-id", file, file)
log.Println("[DEBUG] running command:", cmd)
stdoutStderr, err := cmd.CombinedOutput()

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion installer/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (m *mockConfiguration) writeConfig(pactConfig) error {

func restoreOSXInstallName() func() {
old := setOSXInstallName
setOSXInstallName = func(string, string) error {
setOSXInstallName = func(string) error {
return nil
}

Expand Down

0 comments on commit 4fde79c

Please sign in to comment.