Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Abiola Ibrahim <[email protected]>
  • Loading branch information
abiosoft committed Aug 10, 2024
1 parent 05c63b3 commit e7a149f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import (
"github.com/spf13/cobra"
)

var sshCmdArgs struct {
layer bool
}

// sshCmd represents the ssh command
var sshCmd = &cobra.Command{
Use: "ssh",
Expand All @@ -27,5 +23,4 @@ It is recommended to specify '--' to differentiate from colima flags.`,

func init() {
root.Cmd().AddCommand(sshCmd)
sshCmd.Flags().BoolVarP(&sshCmdArgs.layer, "layer", "l", true, "SSH into the Ubuntu layer (if enabled)")
}
4 changes: 2 additions & 2 deletions config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _ ProfileInfo = (*Profile)(nil)

// ProfileInfo is the information about a profile.
type ProfileInfo interface {
// Dir returns the configuration directory.
// ConfigDir returns the configuration directory.
ConfigDir() string

// LimaInstanceDir returns the directory for the Lima instance.
Expand All @@ -97,6 +97,6 @@ type ProfileInfo interface {
// LimaFile returns the path to the lima config file.
LimaFile() string

// File returns the path to the state file.
// StateFile returns the path to the state file.
StateFile() string
}
2 changes: 1 addition & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (l processManager) Start(ctx context.Context, conf config.Config) error {
_ = l.Stop(ctx, conf) // this is safe, nothing is done when not running

if err := l.init(); err != nil {
return fmt.Errorf("error preparing network directory: %w", err)
return fmt.Errorf("error preparing daemon directory: %w", err)
}

args := []string{osutil.Executable(), "daemon", "start", config.CurrentProfile().ShortName}
Expand Down
2 changes: 1 addition & 1 deletion environment/vm/lima/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (l *limaVM) removeHostAddresses() {
conf, _ := limautil.InstanceConfig()
if !conf.Network.Address {
for _, ip := range util.HostIPAddresses() {
_ = l.Run("sudo", "ip", "address", "del", ip.String()+"/24", "dev", "lo")
_ = l.RunQuiet("sudo", "ip", "address", "del", ip.String()+"/24", "dev", "lo")
}
}
}

0 comments on commit e7a149f

Please sign in to comment.