Re: [go-nuts] exec.Command() always returns error status of 1 when it was executed successfully

2020-02-17 Thread Robert Engels
It would exec.Command returns the result code of the process not whether it was able to be executed. > On Feb 17, 2020, at 7:51 PM, Dan Kortschak wrote: > > What do you see when you > > bash -c "lspci | grep -i vga | grep -i nvidia" > echo $? > > If you have no nvidia line or no vga line i

Re: [go-nuts] exec.Command() always returns error status of 1 when it was executed successfully

2020-02-17 Thread Dan Kortschak
What do you see when you bash -c "lspci | grep -i vga | grep -i nvidia" echo $? If you have no nvidia line or no vga line in lspci, this will output 1. On Mon, 2020-02-17 at 14:41 -0800, Dean Schulze wrote: > This command always sets the err to "exit status 1" even though it > executes correctl

[go-nuts] exec.Command() always returns error status of 1 when it was executed successfully

2020-02-17 Thread Dean Schulze
This command always sets the err to "exit status 1" even though it executes correctly: out, err := exec.Command("/bin/bash", "-c", "lspci | grep -i vga | grep -i nvidia").CombinedOutput() I expected it to return 0 when executing successfully. What am I missing? -- You received this message b