feat(rc): add --force guard for legacy homesickrc

This commit is contained in:
Micheal Wilkinson
2026-03-20 18:05:07 +00:00
parent cd2258e267
commit b070267bde
3 changed files with 20 additions and 6 deletions

View File

@@ -780,6 +780,10 @@ func (a *App) Rc(castle string) error {
homesickD := filepath.Join(castleRoot, ".homesick.d")
homesickRc := filepath.Join(castleRoot, ".homesickrc")
if _, err := os.Stat(homesickRc); err == nil && !a.Force {
return errors.New("refusing to run legacy .homesickrc without --force")
}
// If .homesickrc exists, ensure .homesick.d/parity.rb wrapper is created
// (but do not overwrite an existing parity.rb).
if _, err := os.Stat(homesickRc); err == nil {