diff --git a/v3/mem/mem_solaris.go b/v3/mem/mem_solaris.go index 2d0aac5..11a9cef 100644 --- a/v3/mem/mem_solaris.go +++ b/v3/mem/mem_solaris.go @@ -143,9 +143,9 @@ func SwapDevices() ([]*SwapDevice, error) { func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { swapsCommandPath, err := exec.LookPath(swapsCommand) if err != nil { - return nil, fmt.Errorf("could not find command %q: %w", swapCommand, err) + 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) }