Open Ziqi-Yang opened 1 month ago
This is the source: https://github.com/casey/just/blob/610aa0c52cf8c3d20a79ee641bb9f799ca3027fc/src/recipe.rs#L130
It's intentionally set, but I think it's arguable to make the working directory of the imported recipe different than the command line argument. It may be better to provide a option for import
clause or something else.
I see there is [no-cd]
clause, but it's for single recipe, but not for the whole justfile. And it we have complicated function call hierarchy like python name: (jpg-copy-template name "python") && (jpg-replace-builtin name)
then we need to put [no-cd]
attribute to all of the recipes here.
This is the source:
https://github.com/casey/just/blob/610aa0c52cf8c3d20a79ee641bb9f799ca3027fc/src/recipe.rs#L130
It's intentionally set, but I think it's arguable to make the working directory of the imported recipe different than the command line argument. It may be better to provide a option for
import
clause or something else.
Also, I don't think using self.working_directory
makes much sense, since it's neither the path that the user is at (maybe is, when the user is at the directory that holds the entry justfile), nor the path that the imported justfile is at.
Directory Structure
File content:
When I run
./just/a.just
, it produces: