diff --git a/installer/installer.go b/installer/installer.go index e7b3e07e0..7b5a20e13 100644 --- a/installer/installer.go +++ b/installer/installer.go @@ -236,7 +236,7 @@ func (i *Installer) installDependencies() error { return err } - err = setOSXInstallName(dst, info.libName) + err = setOSXInstallName(dst) if err != nil { return err @@ -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 { diff --git a/installer/installer_test.go b/installer/installer_test.go index 6f65935c8..08e003bd4 100644 --- a/installer/installer_test.go +++ b/installer/installer_test.go @@ -212,7 +212,7 @@ func (m *mockConfiguration) writeConfig(pactConfig) error { func restoreOSXInstallName() func() { old := setOSXInstallName - setOSXInstallName = func(string, string) error { + setOSXInstallName = func(string) error { return nil }