fix: set entrypoint correctly when outside a tty

This commit is contained in:
calebboyd
2019-04-08 16:22:58 -05:00
parent c9c9b5a0a3
commit 448f4270ea
4 changed files with 13 additions and 9 deletions
+2 -1
View File
@@ -45,10 +45,11 @@ export default async function bundle(compiler: NexeCompiler, next: any) {
if (input === STDIN_FLAG) {
const maybeInput = resolveFileNameSync(cwd, '.')
if (!maybeInput) {
if (!maybeInput || !maybeInput.absPath) {
throw new NexeError('No valid input detected')
}
input = maybeInput.absPath
compiler.entrypoint = './' + relative(cwd, input)
}
const { files, warnings } = await resolveFiles(