Skip to content

Commit

Permalink
fix: fix executable command path
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Aug 26, 2021
1 parent c64d381 commit 1452c4b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/controller/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ func (ctrl *Controller) exec(ctx context.Context, exeName string, pkg *Package,
return fmt.Errorf("render the asset name: %w", err)
}
pkgPath := getPkgPath(ctrl.RootDir, pkg, pkgInfo, assetName)
exePath := filepath.Join(pkgPath, exeName) // TODO
src := ""
for _, file := range pkgInfo.Files {
if file.Name != exeName {
continue
}
src = file.Src
}
exePath := filepath.Join(pkgPath, src)
cmd := exec.Command(exePath, args...)
cmd.Stdin = ctrl.Stdin
cmd.Stdout = ctrl.Stdout
Expand Down

0 comments on commit 1452c4b

Please sign in to comment.