mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 01:03:03 +08:00
chore(ci): exit with correct exit code (#29425)
The docker script does not exit with the correct exit code when invoking commends in `execa`. You can verify this by changing `npm run test.e2e` in the script to `npm run foo` (a non-existent script). The underlying command will fail, but the parent script will still exit with exit code 0. Important: The tests themselves have always errored correctly, so this does not impact test execution. Only the invocation of the test command is impacted. This PR ensures that invoking the wrong command causes the parent script to exit with the correct code. Co-authored-by: Brandy Carney <brandyscarney@gmail.com>
This commit is contained in:
@ -53,4 +53,7 @@ if (requestHeaded && !hasHeadedConfigFiles) {
|
||||
console.warn(chalk.yellow.bold('\n⚠️ You are running tests in headed mode, but one or more of your headed config files was not found.\nPlease ensure that both docker-display.txt and docker-display-volume.txt have been created in the correct location.\n'));
|
||||
}
|
||||
|
||||
execa('docker', args, { shell: true, stdio: 'inherit' });
|
||||
const res = await execa('docker', args, { shell: true, stdio: 'inherit' });
|
||||
|
||||
// If underlying scripts failed this whole process should fail too
|
||||
process.exit(res.exitCode);
|
||||
|
Reference in New Issue
Block a user