dir - A string or array of strings for multiple folders to run commands in. If defined the command will executed in all defined folders relative to the configuration file. This does not apply to sub commands.
The question is if this only applies to the current or sub commands as well. This needs to be clarified.
Option 1
If only per command, to execute all sub commands, the dir option needs to be repeated:
[commands.test]
script = "..."
dir = "src"
[commands.test.another]
script = "..."
dir = "src"
Pros
It is always clear what the execution context of a given command is.
Current working directory is always the location if the Litr config file.
Cons
The dir options gets repeated for sub commands.
Option 2
The dir option defines the directory for every sub command, based on the parent.
[commands.test]
script = "..."
dir = "src"
[commands.test.another]
script = "..."
[commands.test.again]
script = "..."
dir = "../different/place"
Pros
Only define a directory once to execute all sub directories in.
Cons
This can get confusing for a user, as the context is not always clear.
Issue
From the Wiki:
The question is if this only applies to the current or sub commands as well. This needs to be clarified.
Option 1
If only per command, to execute all sub commands, the
dir
option needs to be repeated:Pros
Cons
dir
options gets repeated for sub commands.Option 2
The
dir
option defines the directory for every sub command, based on the parent.Pros
Cons