refactor: change regex to be actually universal

This commit is contained in:
Slug-Boi
2024-12-01 20:55:57 +01:00
parent 0f2a002690
commit ccdc550170
+2 -1
View File
@@ -75,6 +75,7 @@ var updateCmd = &cobra.Command{
} }
func cleanup() { func cleanup() {
fmt.Println("Cleaning up")
os.Remove("cocommit.tar.gz") os.Remove("cocommit.tar.gz")
} }
@@ -146,7 +147,7 @@ func updateScript() {
func swapper(exec_path string) { func swapper(exec_path string) {
regExp, err := regexp.Compile("cocommit_go-darwin") regExp regexp.MustCompile("cocommit-.+")
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }