From 5348b3ccce4563ee7e704698922eeafe8f029ce2 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 2 May 2020 19:58:58 -0700 Subject: [PATCH] test: do not write to mastodon.log in travis (#1761) * test: do not write to mastodon.log in travis * fixup --- bin/run-mastodon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/run-mastodon.js b/bin/run-mastodon.js index f5316c6e..7945a47c 100644 --- a/bin/run-mastodon.js +++ b/bin/run-mastodon.js @@ -109,7 +109,9 @@ async function runMastodon () { await writeFile(installedFile, '', 'utf8') } const promise = spawn('foreman', ['start'], { cwd, env }) - const log = fs.createWriteStream('mastodon.log', { flags: 'a' }) + // don't bother writing to mastodon.log in Travis; we can't read the file anyway + const logFile = process.env.TRAVIS === 'true' ? '/dev/null' : 'mastodon.log' + const log = fs.createWriteStream(logFile, { flags: 'a' }) childProc = promise.childProcess childProc.stdout.pipe(log) childProc.stderr.pipe(log)