Skip to content

Commit

Permalink
Fix some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Dec 30, 2024
1 parent 2f47898 commit cf620b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/cli/tests/snapshots/project_test__with_tasks.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: assert.output()

Project: tasks
Source: tasks
Platform: node
Toolchains: typescript, javascript
Language: typescript
Stack: unknown
Type: unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ expression: assert.output()
Project: scripts
Alias: test-bun-scripts
Source: scripts
Platform: bun
Toolchains: javascript
Language: javascript
Stack: unknown
Type: unknown
Expand Down
5 changes: 4 additions & 1 deletion crates/task-expander/src/token_expander.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,10 @@ impl<'graph> TokenExpander<'graph> {
// Task
"target" => Cow::Borrowed(task.target.as_str()),
"task" => Cow::Borrowed(task.id.as_str()),
"taskPlatform" | "taskToolchain" => Cow::Borrowed(task.toolchains[0].as_str()),
"taskPlatform" | "taskToolchain" => match task.toolchains.first() {
Some(tc) => Cow::Borrowed(tc.as_str()),
None => Cow::Owned("unknown".into()),
},
"taskToolchains" => Cow::Owned(task.toolchains.join(",")),
"taskType" => Cow::Owned(task.type_of.to_string()),
// Datetime
Expand Down

0 comments on commit cf620b4

Please sign in to comment.