Skip to content

fix: make RemoteInstaller.Install return error instead of silently returning nil#5

Open
Ricardo-M-L wants to merge 1 commit into
masterfrom
feat/contribution
Open

fix: make RemoteInstaller.Install return error instead of silently returning nil#5
Ricardo-M-L wants to merge 1 commit into
masterfrom
feat/contribution

Conversation

@Ricardo-M-L
Copy link
Copy Markdown
Owner

Summary

  • Fix RemoteInstaller.Install which was returning (nil, nil) - a silent failure that masks programming errors
  • Changed to return an explicit error indicating the method should not be called directly

What

RemoteInstaller.Install was a no-op that returned (nil, nil). This is problematic because:

  1. It silently ignores all parameters passed to it
  2. If code ever mistakenly calls RemoteInstaller.Install instead of InstallRemote, the error goes undetected
  3. The Installer interface contract expects either a valid *Result or an error

How

Changed the method to return fmt.Errorf("RemoteInstaller.Install should not be called directly - use InstallRemote instead") and added the necessary fmt import.

Testing

  • go build ./... passes
  • go vet ./internal/installer/ passes

Closes #XXX

🤖 Generated with Claude Code

…turning nil

RemoteInstaller.Install was a no-op that returned (nil, nil), which
silently masks programming errors when it's called directly instead
of InstallRemote(). This adds an explicit error to catch such misuse.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant