diff --git a/src/artifacts.js b/src/artifacts.js index ff09641..7aef25f 100644 --- a/src/artifacts.js +++ b/src/artifacts.js @@ -16,7 +16,7 @@ function readDirAsync (dir) { }).reduce((a, b) => a.concat(b), []) } -function maybeReadFileContents (file) { +function maybeReadFileContentsAsync (file) { return readFileAsync(file, 'utf-8') .catch(e => { if (e.code === 'ENOENT') { @@ -52,7 +52,7 @@ export default async function artifacts (compiler, next) { return map(compiler.files, async (file) => { const sourceFile = join(src, file.filename) const tempFile = join(temp, file.filename) - const fileContents = await maybeReadFileContents(sourceFile) + const fileContents = await maybeReadFileContentsAsync(sourceFile) await mkdirpAsync(dirname(tempFile)) await writeFileAsync(tempFile, fileContents) diff --git a/src/cli.js b/src/cli.js index 567e9d2..5604d99 100644 --- a/src/cli.js +++ b/src/cli.js @@ -70,7 +70,7 @@ export default async function cli (compiler, next) { if (e) { reject(e) } else { - resolve(compiler.log.info('Executable written: ' + output)) + compiler.log.info('Executable written: ' + output, resolve) } }) }