Skip to content

Commit

Permalink
more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arbll committed May 11, 2024
1 parent 3a396c0 commit 3e3e52e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/installer/subcommands/installer/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (

// Commands returns the installer subcommands.
func Commands(_ *command.GlobalParams) []*cobra.Command {
return []*cobra.Command{bootstrapCommand(), installCommand(), removeCommand(), installExperimentCommand(), removeExperimentCommand(), promoteExperimentCommand(), garbageCollectCommand(), purgeCommand()}
return []*cobra.Command{bootstrapCommand(), installCommand(), removeCommand(), installExperimentCommand(), removeExperimentCommand(), promoteExperimentCommand(), garbageCollectCommand(), purgeCommand(), isInstalledCommand()}
}

type cmd struct {
Expand Down Expand Up @@ -312,7 +312,7 @@ const (
ReturnCodeIsInstalledFalse = 10
)

func isInstalled() *cobra.Command {
func isInstalledCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "is-installed <package>",
Short: "Check if a package is installed",
Expand Down
2 changes: 1 addition & 1 deletion pkg/fleet/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type testPackageManager struct {
}

func (m *testPackageManager) IsInstalled(ctx context.Context, pkg string) (bool, error) {
args := m.Called(pkg)
args := m.Called(ctx, pkg)
return args.Bool(0), args.Error(1)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/fleet/internal/exec/installer_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (i *InstallerExec) GarbageCollect(ctx context.Context) (err error) {
return cmd.Run()
}

// IsInstalled checks if a package is installed.
func (i *InstallerExec) IsInstalled(ctx context.Context, pkg string) (_ bool, err error) {
cmd := i.newInstallerCmd(ctx, "is-installed", pkg)
defer func() { cmd.span.Finish(tracer.WithError(err)) }()
Expand Down

0 comments on commit 3e3e52e

Please sign in to comment.