Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/playwright-core/src/containers/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export function addDockerCLI(program: Command) {
await buildPlaywrightImage();
} catch (e) {
console.error(e.stack ? e : e.message);
process.exit(1);
}
});

Expand All @@ -296,6 +297,7 @@ export function addDockerCLI(program: Command) {
await startPlaywrightContainer();
} catch (e) {
console.error(e.stack ? e : e.message);
process.exit(1);
}
});

Expand All @@ -306,6 +308,7 @@ export function addDockerCLI(program: Command) {
await stopAllPlaywrightContainers();
} catch (e) {
console.error(e.stack ? e : e.message);
process.exit(1);
}
});

Expand All @@ -316,19 +319,20 @@ export function addDockerCLI(program: Command) {
await deletePlaywrightImage();
} catch (e) {
console.error(e.stack ? e : e.message);
process.exit(1);
}
});

dockerCommand.command('install-server-deps', { hidden: true })
.description('delete docker image, if any')
.description('install run-server dependencies')
.action(async function() {
const { code } = await spawnAsync('bash', [path.join(__dirname, '..', '..', 'bin', 'container_install_deps.sh')], { stdio: 'inherit' });
if (code !== 0)
throw new Error('Failed to install server dependencies!');
});

dockerCommand.command('run-server', { hidden: true })
.description('delete docker image, if any')
.description('run playwright server')
.action(async function() {
await spawnAsync('bash', [path.join(__dirname, '..', '..', 'bin', 'container_run_server.sh')], { stdio: 'inherit' });
});
Expand Down