Skip to content

Commit b8e0dc3

Browse files
authored
chore(task): add test for empty new line (#203)
1 parent 7fc6f5f commit b8e0dc3

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

crates/vite_task/src/schedule.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ impl ExecutionPlan {
167167

168168
// Execute or replay the task
169169
let exit_status = execute_or_replay.await?;
170+
171+
// FIXME: Print a new line to separate the tasks output, need a better solution
170172
println!();
171173
Ok(ExecutionStatus {
172174
execution_id,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"scripts": {
3+
"hello": "echo -n foo && echo bar"
4+
}
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
> vite run hello
2+
$ echo -n foo
3+
foo
4+
$ echo bar
5+
bar
6+
7+
8+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9+
Vite+ Task Runner • Execution Summary
10+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11+
12+
Statistics: 2 tasks • 0 cache hits • 2 cache misses
13+
Performance: 0% cache hit rate
14+
15+
Task Details:
16+
────────────────────────────────────────────────
17+
[1] hello(subcommand 0): $ echo -n foo ✓
18+
→ Cache miss: no previous cache entry found
19+
·······················································
20+
[2] hello: $ echo bar ✓
21+
→ Cache miss: no previous cache entry found
22+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"env": {
3+
"VITE_DISABLE_AUTO_INSTALL": "1"
4+
},
5+
"commands": [
6+
"vite run hello"
7+
]
8+
}

0 commit comments

Comments
 (0)