Skip to content

Commit

Permalink
Fixes Exec invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
leucos committed Oct 5, 2020
1 parent 0ed129b commit 1445ccc
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ func RootCmd() *cobra.Command {
If your directory has a '.binenv.lock', proper versions will always be
selected.`,
SilenceUsage: true,
Run: func(cmd *cobra.Command, args []string) {
// Run as a shim for installed distributions
if !strings.HasSuffix(os.Args[0], "binenv") {
a.Execute(os.Args)
}
},
// Run: func(cmd *cobra.Command, args []string) {
// // Run as a shim for installed distributions
// if !strings.HasSuffix(os.Args[0], "binenv") {
// a.Execute(os.Args)
// }
// },
}

if !strings.HasSuffix(os.Args[0], "binenv") {
a.Execute(os.Args)
}

rootCmd.PersistentFlags().BoolP("verbose", "v", false, "Verbose operation")
Expand Down

0 comments on commit 1445ccc

Please sign in to comment.