Hi all,
I'm using OpenBSD 6.4 amd64 (GENERIC.MP) #6
Using 'pkg_add' i can't access stdout, and the exit code stays 0
whatever it finds or not the package to install.
Example :
doas pkg_add sl > file.stdout
echo $? # exit code is 0
cat file.stdout # empty file
or
doas pkg_add sl > file.stdout 2>&1
cat file.stdout # empty file
Therefore, i can access stderr trying to install a bad package name but
exit code stays 0
doas pkg_add sli > file.stderr
echo $? # exit code is 0
cat file.stderr # => Can't find sli
Reading pkg_add(1) :
Interactive mode is the default on a tty
-I Force non-interactive mode. Default is to be interactive when run
from a tty.
-i Force interactive mode, even if not run from a tty. pkg_add may ask
questions to the user if faced with difficult decisions.
I also tried with -i/-I same issue.
Any way to get stdout ? Is this an expected behavior ?
Thanks,
Wesley