From 962f855e7cc9cda8ebae1778a996acc3f585376c Mon Sep 17 00:00:00 2001 From: Horiodino Date: Tue, 11 Jun 2024 15:43:45 +0100 Subject: [PATCH] fix after review Signed-off-by: Horiodino --- cmd/direnv/direnv.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cmd/direnv/direnv.go b/cmd/direnv/direnv.go index 61f909d3..aebe5c03 100644 --- a/cmd/direnv/direnv.go +++ b/cmd/direnv/direnv.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "os" - "os/exec" "regexp" "strings" @@ -34,12 +33,6 @@ var Direnv = &cobra.Command{ os.Exit(1) } } - - cmD := exec.Command("direnv", "allow") - err = cmD.Run() - if err != nil { - os.Exit(1) - } }, } @@ -69,7 +62,6 @@ func generateEnvrc() error { _, err = file.WriteString("\nuse flake bsf/.") if err != nil { - fmt.Println(styles.ErrorStyle.Render("", err.Error())) return err } return nil @@ -107,7 +99,6 @@ func fetchGitignore() error { file, err := os.OpenFile(".gitignore", os.O_APPEND|os.O_WRONLY, 0644) _, err = file.WriteString("\n.envrc") if err != nil { - fmt.Println(styles.ErrorStyle.Render("", err.Error())) return err } } @@ -151,12 +142,6 @@ func setDIrenv(args string) error { return err } - cmd := exec.Command("direnv", "allow") - err = cmd.Run() - if err != nil { - return err - } - return nil }