Skip to content

Commit

Permalink
fix(daemon): fix daemon unable to find mock + verification service wh…
Browse files Browse the repository at this point in the history
…en called from $PATH
  • Loading branch information
mefellows committed Jun 11, 2016
1 parent 0ea229b commit 879a3b4
Show file tree
Hide file tree
Showing 37 changed files with 8,165 additions and 3 deletions.
3 changes: 2 additions & 1 deletion daemon/pact_mock_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"

"github.com/kardianos/osext"
"github.com/pact-foundation/pact-go/utils"
)

Expand Down Expand Up @@ -35,6 +36,6 @@ func (m *PactMockService) NewService(args []string) (int, Service) {
}

func getMockServiceCommandPath() string {
dir, _ := os.Getwd()
dir, _ := osext.ExecutableFolder()
return fmt.Sprintf(filepath.Join(dir, "pact-mock-service", "bin", "pact-mock-service"))
}
5 changes: 3 additions & 2 deletions daemon/verification_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package daemon
import (
"fmt"
"log"
"os"
"path/filepath"

"github.com/kardianos/osext"
)

// VerificationService is a wrapper for the Pact Provider Verifier Service.
Expand All @@ -30,6 +31,6 @@ func (m *VerificationService) NewService(args []string) (int, Service) {
}

func getVerifierCommandPath() string {
dir, _ := os.Getwd()
dir, _ := osext.ExecutableFolder()
return fmt.Sprintf(filepath.Join(dir, "pact-provider-verifier", "bin", "pact-provider-verifier"))
}
27 changes: 27 additions & 0 deletions vendor/github.com/kardianos/osext/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions vendor/github.com/kardianos/osext/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions vendor/github.com/kardianos/osext/osext.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/kardianos/osext/osext_plan9.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions vendor/github.com/kardianos/osext/osext_procfs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

126 changes: 126 additions & 0 deletions vendor/github.com/kardianos/osext/osext_sysctl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 879a3b4

Please sign in to comment.