Skip to content

Commit 69aac74

Browse files
committed
fix debug
1 parent 6fa1b8d commit 69aac74

File tree

1 file changed

+7
-1
lines changed
  • dev-packages/node-integration-tests/utils

1 file changed

+7
-1
lines changed

dev-packages/node-integration-tests/utils/runner.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ async function runDockerCompose(options: DockerOptions): Promise<VoidFunction> {
110110
return new Promise((resolve, reject) => {
111111
const cwd = join(...options.workingDirectory);
112112
const close = (): void => {
113-
spawnSync('docker', ['compose', 'down', '--volumes'], { cwd, stdio: 'inherit' });
113+
spawnSync('docker', ['compose', 'down', '--volumes'], {
114+
cwd,
115+
stdio: process.env.DEBUG ? 'inherit' : undefined,
116+
});
114117
};
115118

116119
// ensure we're starting fresh
@@ -126,6 +129,9 @@ async function runDockerCompose(options: DockerOptions): Promise<VoidFunction> {
126129
function newData(data: Buffer): void {
127130
const text = data.toString('utf8');
128131

132+
// eslint-disable-next-line no-console
133+
if (process.env.DEBUG) console.log(text);
134+
129135
for (const match of options.readyMatches) {
130136
if (text.includes(match)) {
131137
child.stdout.removeAllListeners();

0 commit comments

Comments
 (0)