每次rpm
命令都会返回不同的退出代码。
例如,如果依赖性失败,有时echo $?
给出1,有时给出5。有人可以解释吗?
答案 0 :(得分:0)
这是由于任何原因而失败的数量,
$ rpm -i $(seq 1 3); echo "Failed with $?"
error: open of 1 failed: No such file or directory
error: open of 2 failed: No such file or directory
error: open of 3 failed: No such file or directory
Failed with 3