test: do not write to mastodon.log in travis (#1761)

* test: do not write to mastodon.log in travis

* fixup
This commit is contained in:
Nolan Lawson 2020-05-02 19:58:58 -07:00 committed by GitHub
parent 6447326f5c
commit 5348b3ccce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ async function runMastodon () {
await writeFile(installedFile, '', 'utf8') await writeFile(installedFile, '', 'utf8')
} }
const promise = spawn('foreman', ['start'], { cwd, env }) 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 = promise.childProcess
childProc.stdout.pipe(log) childProc.stdout.pipe(log)
childProc.stderr.pipe(log) childProc.stderr.pipe(log)