Skip to content

Commit

Permalink
Fix getTargetEngine in shim: Don't panic if there's no target script
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Dec 30, 2015
1 parent f4b896f commit 8d95e22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file modified bin/node.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions src/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ func getInstalledVersions() (versions []*semver.Version, error error) {
}

func getTargetEngine() (spec string, error error) {
if len(os.Args) < 2 {
return
}

targetFile := os.Args[1]

dir := filepath.Dir(targetFile)
if !filepath.IsAbs(dir) {
cwd, err := os.Getwd()
Expand Down

0 comments on commit 8d95e22

Please sign in to comment.