mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
* feat: implement prettier and fix all issues * fix: failing tests * fix: implement feedback from codel, ai etc * chore: dont throw in trim function Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * fix: incorrect fix --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
25 lines
548 B
JavaScript
25 lines
548 B
JavaScript
import { spawn } from 'child_process';
|
|
|
|
const args = process.argv.slice(2);
|
|
|
|
console.log(`Running ${args.join(' ')} on ${process.version}\n`);
|
|
|
|
const match = /v(\d+)/.exec(process.version);
|
|
|
|
const isHotfixNeeded = match && match[1] > 16;
|
|
|
|
isHotfixNeeded && console.warn('Setting --openssl-legacy-provider as ssl hotfix');
|
|
|
|
const test = spawn(
|
|
'cross-env',
|
|
isHotfixNeeded ? ['NODE_OPTIONS=--openssl-legacy-provider', ...args] : args,
|
|
{
|
|
shell: true,
|
|
stdio: 'inherit',
|
|
}
|
|
);
|
|
|
|
test.on('exit', function (code) {
|
|
process.exit(code);
|
|
});
|