From d644c6bef660369c936199ae0b7bb5bd6eb37961 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 6 Oct 2021 11:11:09 -0400 Subject: [PATCH] fix: mem/mem_solaris.go:148:42: cannot use swapsCommandPath (type string) as type context.Context in argument to invoke.CommandWithContext - add ctx to call --- v3/mem/mem_solaris.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/mem/mem_solaris.go b/v3/mem/mem_solaris.go index 9bbccfb..d40362f 100644 --- a/v3/mem/mem_solaris.go +++ b/v3/mem/mem_solaris.go @@ -146,7 +146,7 @@ func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { if err != nil { return nil, fmt.Errorf("could not find command %q: %w", swapsCommand, err) } - output, err := invoke.CommandWithContext(swapsCommandPath, "-l") + output, err := invoke.CommandWithContext(ctx, swapsCommandPath, "-l") if err != nil { return nil, fmt.Errorf("could not execute %q: %w", swapsCommand, err) }