Skip to content

Commit 16a9af1

Browse files
committed
account for TTY on CI
1 parent 051a29f commit 16a9af1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/scripts/docker.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ const pwd = resolve('./');
2929
* --init is recommended to avoid zombie processes: https://playwright.dev/docs/ci#docker
3030
* --mount allow us to mount the local Ionic project inside of the Docker container so devs do not need to re-build the project in Docker.
3131
*/
32-
const args = ['run', '--rm', '-it', '--init', `-e DISPLAY=${display}`, `-v ${displayVolume}`, '--ipc=host', `--mount=type=bind,source=${pwd},target=/ionic`, 'ionic-playwright', 'npm run test.e2e --', ...process.argv.slice(2)];
32+
const args = ['run', '--rm', '--init', `-e DISPLAY=${display}`, `-v ${displayVolume}`, '--ipc=host', `--mount=type=bind,source=${pwd},target=/ionic`, 'ionic-playwright', 'npm run test.e2e --', ...process.argv.slice(2)];
3333

3434
// Set the CI env variable so Playwright uses the CI config
3535
if (process.env.CI) {
3636
args.splice(1, 0, '-e CI=true');
37+
/**
38+
* Otherwise, we should let the session be interactive locally. This will
39+
* not work on CI which is why we do not apply it there.
40+
*/
41+
} else {
42+
args.splice(1, 0, '-it');
3743
}
3844

3945
/**

0 commit comments

Comments
 (0)