diff --git a/crates/vite_task/src/schedule.rs b/crates/vite_task/src/schedule.rs index 56001874e4..73a82b7e86 100644 --- a/crates/vite_task/src/schedule.rs +++ b/crates/vite_task/src/schedule.rs @@ -167,6 +167,8 @@ impl ExecutionPlan { // Execute or replay the task let exit_status = execute_or_replay.await?; + + // FIXME: Print a new line to separate the tasks output, need a better solution println!(); Ok(ExecutionStatus { execution_id, diff --git a/packages/cli/snap-tests/task-no-trailing-newline/package.json b/packages/cli/snap-tests/task-no-trailing-newline/package.json new file mode 100644 index 0000000000..3807c88c54 --- /dev/null +++ b/packages/cli/snap-tests/task-no-trailing-newline/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "hello": "echo -n foo && echo bar" + } +} diff --git a/packages/cli/snap-tests/task-no-trailing-newline/snap.txt b/packages/cli/snap-tests/task-no-trailing-newline/snap.txt new file mode 100644 index 0000000000..0d82a6f321 --- /dev/null +++ b/packages/cli/snap-tests/task-no-trailing-newline/snap.txt @@ -0,0 +1,22 @@ +> vite run hello +$ echo -n foo +foo +$ echo bar +bar + + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + Vite+ Task Runner • Execution Summary +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Statistics: 2 tasks • 0 cache hits • 2 cache misses +Performance: 0% cache hit rate + +Task Details: +──────────────────────────────────────────────── + [1] hello(subcommand 0): $ echo -n foo ✓ + → Cache miss: no previous cache entry found + ······················································· + [2] hello: $ echo bar ✓ + → Cache miss: no previous cache entry found +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/packages/cli/snap-tests/task-no-trailing-newline/steps.json b/packages/cli/snap-tests/task-no-trailing-newline/steps.json new file mode 100644 index 0000000000..e1a52543b0 --- /dev/null +++ b/packages/cli/snap-tests/task-no-trailing-newline/steps.json @@ -0,0 +1,8 @@ +{ + "env": { + "VITE_DISABLE_AUTO_INSTALL": "1" + }, + "commands": [ + "vite run hello" + ] +}