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