Skip to content

Commit 8806e5b

Browse files
committed
simplifying the task command line using bash parameter expansion
1 parent 7c1f623 commit 8806e5b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pixi.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ cu13 = { features = ["cu13"], solve-group = "cu13" }
3131
# Usage: pixi run test (default) or pixi run -e cu12 test or pixi run -e cu13 test
3232
# The environment specified with -e is automatically passed down via PIXI_ENVIRONMENT_NAME
3333
[target.linux.tasks.test-pathfinder]
34-
cmd = ["bash", "-c", "cd cuda_pathfinder && if [ -n \"${PIXI_ENVIRONMENT_NAME:-}\" ]; then pixi run --environment \"$PIXI_ENVIRONMENT_NAME\" test; else pixi run test; fi"]
34+
cmd = ["bash", "-c", "cd cuda_pathfinder && pixi run ${PIXI_ENVIRONMENT_NAME:+--environment \"$PIXI_ENVIRONMENT_NAME\"} test"]
3535

3636
[target.linux.tasks.test-bindings]
37-
cmd = ["bash", "-c", "cd cuda_bindings && if [ -n \"${PIXI_ENVIRONMENT_NAME:-}\" ]; then pixi run --environment \"$PIXI_ENVIRONMENT_NAME\" test; else pixi run test; fi"]
37+
cmd = ["bash", "-c", "cd cuda_bindings && pixi run ${PIXI_ENVIRONMENT_NAME:+--environment \"$PIXI_ENVIRONMENT_NAME\"} test"]
3838

3939
[target.linux.tasks.test-core]
40-
cmd = ["bash", "-c", "cd cuda_core && if [ -n \"${PIXI_ENVIRONMENT_NAME:-}\" ]; then pixi run --environment \"$PIXI_ENVIRONMENT_NAME\" test; else pixi run test; fi"]
40+
cmd = ["bash", "-c", "cd cuda_core && pixi run ${PIXI_ENVIRONMENT_NAME:+--environment \"$PIXI_ENVIRONMENT_NAME\"} test"]
4141

4242
[target.linux.tasks.test]
4343
depends-on = [

0 commit comments

Comments
 (0)