Skip to content

Commit

Permalink
Fix some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah-Kolide committed Feb 9, 2024
1 parent b34cb2f commit ec5076c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ee/tables/nix_env/nix_upgradeable.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package nix_env_upgradeable
import (
"fmt"
"io"
"os/exec"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
Expand Down Expand Up @@ -56,7 +55,7 @@ func (t *Table) generate(ctx context.Context, queryContext table.QueryContext) (
dataflatten.WithQuery(strings.Split(dataQuery, "/")),

Check failure on line 55 in ee/tables/nix_env/nix_upgradeable.go

View workflow job for this annotation

GitHub Actions / launcher (ubuntu-20.04)

undefined: strings

Check failure on line 55 in ee/tables/nix_env/nix_upgradeable.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

undefined: strings

Check failure on line 55 in ee/tables/nix_env/nix_upgradeable.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

undefined: strings
}

flattened, err := t.Xml(output, flattenOpts...)
flattened, err := dataflatten.Xml(output, flattenOpts...)
if err != nil {
level.Info(t.logger).Log("msg", "failure flattening output", "err", err)
continue
Expand Down Expand Up @@ -90,9 +89,9 @@ func (t *Table) getUserPackages(ctx context.Context, uid string) ([]byte, error)
return nil, fmt.Errorf("runAsUser nix-env command as user %s: %w", uid, err)
}

data, err := io.ReadAll(output)
data, err := io.ReadAll(stdout)
if err != nil {
return nil, fmt.Errorf("ReadAll nix-env output: %w", err)
return nil, fmt.Errorf("ReadAll nix-env stdout: %w", err)
}

if err := cmd.Wait(); err != nil {
Expand Down

0 comments on commit ec5076c

Please sign in to comment.