diff --git a/.github/workflows/it-tests.yml b/.github/workflows/it-tests.yml index 5d9ede1f26..71cc24e4b4 100644 --- a/.github/workflows/it-tests.yml +++ b/.github/workflows/it-tests.yml @@ -63,8 +63,13 @@ jobs: PREPARE_TEST_ENV_TYPE: ${{ matrix.testEnvironment }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: fregante/setup-git-user@v2 - uses: ./tools/github-actions/download-build-output - uses: ./tools/github-actions/setup + - shell: bash + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "AmadeusITGroup-otter@users.noreply.github.com" - uses: ./.github/actions/setup-java with: install-jdk: 'true' diff --git a/packages/@ama-sdk/create/src/index.ts b/packages/@ama-sdk/create/src/index.ts index 4b3c276ec5..d152109524 100644 --- a/packages/@ama-sdk/create/src/index.ts +++ b/packages/@ama-sdk/create/src/index.ts @@ -95,7 +95,7 @@ const run = () => { ]; const errors = steps - .map((step) => spawnSync(step.runner || process.execPath, step.args, { stdio: 'inherit', cwd: step.cwd || process.cwd() })) + .map((step) => spawnSync(step.runner || process.execPath, step.args, { stdio: 'inherit', cwd: step.cwd || process.cwd(), shell: true })) .filter(({error, status}) => (error || status !== 0)); if (errors.length > 0) { diff --git a/packages/@o3r/create/src/index.ts b/packages/@o3r/create/src/index.ts index b67f3fc6d1..e083de6ee9 100644 --- a/packages/@o3r/create/src/index.ts +++ b/packages/@o3r/create/src/index.ts @@ -147,7 +147,8 @@ const createNgProject = () => { .filter(([key]) => isNgNewOptions(key)) .flat(); exitProcessIfErrorInSpawnSync(1, spawnSync(process.execPath, [binPath, 'new', ...argv._, ...options], { - stdio: 'inherit' + stdio: 'inherit', + shell: true })); }; @@ -192,12 +193,14 @@ const prepareWorkspace = (relativeDirectory = '.', projectPackageManager = 'npm' if (projectPackageManager === 'yarn') { exitProcessIfErrorInSpawnSync(2, spawnSync(runner, ['set', 'version', argv['yarn-version'] || 'stable'], { stdio: 'inherit', + shell: true, cwd })); } exitProcessIfErrorInSpawnSync(2, spawnSync(runner, ['install'], { stdio: 'inherit', + shell: true, cwd })); }; @@ -211,6 +214,7 @@ const addOtterFramework = (relativeDirectory = '.', projectPackageManager = 'npm exitProcessIfErrorInSpawnSync(3, spawnSync(runner, ['exec', 'ng', 'add', `@o3r/core@${exactO3rVersion ? '' : '~'}${version}`, ...(projectPackageManager === 'npm' ? ['--'] : []), ...options], { stdio: 'inherit', cwd, + shell: true, env: exactO3rVersion && projectPackageManager === 'npm' ? { ...process.env, // eslint-disable-next-line @typescript-eslint/naming-convention, camelcase