Skip to content

Commit f7a2892

Browse files
authored
feat: add newline when in TTY mode (#104)
1 parent 1bf6dab commit f7a2892

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/build-program.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function actionHandler(this: Command) {
3737
throw new FunctionReferenceError(functionName, moduleName);
3838
}
3939

40-
process.stdout.write(String(entryRef()));
40+
const output = String(entryRef());
41+
process.stdout.write(output + (process.stdout.isTTY ? '\n' : ''));
4142
}
4243

4344
export function buildProgram(): Command {

0 commit comments

Comments
 (0)