fix: satisfy lint and regenerate formulas
This commit is contained in:
@@ -46,7 +46,9 @@ func Remove() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hookPath := filepath.Join(state.ConfigDir(), "shell-hook.sh")
|
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
|
return nil
|
||||||
}
|
}
|
||||||
@@ -97,7 +99,9 @@ func addToRCFile(path string) error {
|
|||||||
|
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
backupPath := path + ".gastown-backup"
|
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)
|
return os.WriteFile(path, []byte(content+block), 0644)
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ func Remove() error {
|
|||||||
wrappers := []string{"gt-codex", "gt-opencode"}
|
wrappers := []string{"gt-codex", "gt-opencode"}
|
||||||
for _, name := range wrappers {
|
for _, name := range wrappers {
|
||||||
destPath := filepath.Join(binDir, name)
|
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
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user