Skip to content

Commit

Permalink
doc: add more garden.root details to the configuration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davvid committed Dec 15, 2023
1 parent c9e53cb commit d7aab97
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions doc/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ Slashes in tree paths will create new directories on disk as needed.
`garden.root` defaults to the current directory when unspecified.

The built-in `${GARDEN_CONFIG_DIR}` variable can be used to create relocatable
setups that define a `garden.root` relative to the garden file itself.
setups by defining `garden.root` relative to the garden file itself.

```yaml
# By default, "garden init" generates a "garden.yaml" that uses the
# ${GARDEN_CONFIG_DIR} for its "garden.root" location.
garden:
root: ${GARDEN_CONFIG_DIR}
```
To place all trees in a `src` directory sibling to the `garden.yaml` file, the
following configuration can be used:
Expand Down Expand Up @@ -255,7 +262,7 @@ trees:
```

The example above exports a variable called `foo_LOCATION` with the location of the tree.
If `foo_LOCATION` is already defined then it its value is replaced.
If `foo_LOCATION` is already defined then its value is replaced.

A plus sign (`+`) suffix in the name append to a variable instead of prepending.

Expand Down

0 comments on commit d7aab97

Please sign in to comment.