dir issue

This commit is contained in:
maddalax 2024-09-23 12:04:17 -05:00
parent f4fcf6f7c4
commit 9e23e7cf2b

View file

@ -8,7 +8,6 @@ import (
"go/token" "go/token"
"log" "log"
"os" "os"
"os/exec"
"path/filepath" "path/filepath"
) )
@ -56,14 +55,9 @@ func WriteFile(path string, cb func(content *ast.File) string) {
return return
} }
} }
// Define the file path where you want to save the buffer // Define the file path where you want to save the buffer
process.Run("git add " + path)
cmd := exec.Command("git", "add", path)
err = cmd.Run()
if err != nil {
log.Printf("Failed to run git add: %v\n", err)
}
// Save the buffer to a file // Save the buffer to a file
err = os.WriteFile(path, bytes, 0644) err = os.WriteFile(path, bytes, 0644)