diff --git a/src/tasks/stdio/print.ts b/src/tasks/stdio/print.ts index 3f8afaa..265b3f4 100644 --- a/src/tasks/stdio/print.ts +++ b/src/tasks/stdio/print.ts @@ -2,10 +2,10 @@ import { Task, Context } from '../../definitions'; import { addPrefix } from '../../helpers/prefix'; import util from 'util'; -export function print(item: any, ...data: any[]): Task.Sync { +export function print(...data: any[]): Task.Sync { return (ctx: Context): void => { const str = addPrefix( - util.format(item, ...data) + '\n', + data.length ? util.format(data[0], ...data.slice(1)) + '\n' : '\n', null, 'print', ctx