Why does scp have an exit status of 0 after an error message?

On Linux or Cygwin, I get the following (note the invalid location in the username):

>scp file.txt "invalid user@host.com:file.txt"
invalid user: invalid user name
>echo $?
0

Why is exit status 0?

Note. I know a well-known error related to scp failure, but in the above case the error is printed in stderr.

+4
source share
1 answer

An error. I informed him.

0
source

Source: https://habr.com/ru/post/1684278/


All Articles