Fix: exit with error code whan install fail in CLI. Fix #1414