Skip to content

Execute shared recipes from imported justfile? #2665

Answered by cubt85iz
cubt85iz asked this question in Q&A
Discussion options

You must be logged in to vote

Ah...so it needs it's own path.

shared.just

# Outputs message to stderr in standardized format.
stderr message level:
  @>&2 echo "{{ level }}: {{ message }}"

test.just

import "shared.just"

# Echo a test message.
output:
  @just -f "{{ justfile() }}" stderr "test" "ERROR"
automatos-server-dotfiles on  main [?] took 13s 
❯ just -f test.just output
ERROR: test

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@cubt85iz
Comment options

Comment options

You must be logged in to vote
1 reply
@cubt85iz
Comment options

Answer selected by cubt85iz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants