Skip to content

Commit fc9d789

Browse files
author
jmccormick2001
committed
fix pgo to use env var for bash completion generation
1 parent e91856d commit fc9d789

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pgo/cmd/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ func initConfig() {
8484

8585
GetCredentials()
8686

87-
//generateBashCompletion()
87+
if os.Getenv("GENERATE_BASH_COMPLETION") != "" {
88+
generateBashCompletion()
89+
}
8890
}
8991

9092
func generateBashCompletion() {
93+
log.Debugf("generating bash completion script")
9194
file, err2 := os.Create("/tmp/pgo-bash-completion.out")
9295
if err2 != nil {
9396
fmt.Println("Error: ", err2.Error())

0 commit comments

Comments
 (0)