Properly check return of Invoke-Expression
In cibuild-legacy.ps1 we cannot use Exec-Expression because it's a bootstrapping problem. Hence we have to use Invoke-Expression directly. Even though we invoke a script via Invoke-Expression here we still must check $LastExitCode. In the case where the script exits explicitly with an exit code this doesn't actually cause $? to be $false. Hence we still must check both values here.
Showing
想要评论请 注册 或 登录