fix: satisfy lint and regenerate formulas

This commit is contained in:
joshuavial
2026-01-09 22:37:03 +13:00
committed by Steve Yegge
parent dcb085e64e
commit f9473c7b9e
2 changed files with 9 additions and 3 deletions

View File

@@ -46,7 +46,9 @@ func Remove() error {
}
hookPath := filepath.Join(state.ConfigDir(), "shell-hook.sh")
os.Remove(hookPath)
if err := os.Remove(hookPath); err != nil && !os.IsNotExist(err) {
return fmt.Errorf("removing hook script: %w", err)
}
return nil
}
@@ -97,7 +99,9 @@ func addToRCFile(path string) error {
if len(data) > 0 {
backupPath := path + ".gastown-backup"
os.WriteFile(backupPath, data, 0644)
if err := os.WriteFile(backupPath, data, 0644); err != nil {
return fmt.Errorf("writing backup: %w", err)
}
}
return os.WriteFile(path, []byte(content+block), 0644)

View File

@@ -48,7 +48,9 @@ func Remove() error {
wrappers := []string{"gt-codex", "gt-opencode"}
for _, name := range wrappers {
destPath := filepath.Join(binDir, name)
os.Remove(destPath)
if err := os.Remove(destPath); err != nil && !os.IsNotExist(err) {
return fmt.Errorf("removing %s: %w", name, err)
}
}
return nil