aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/environment.md
blob: 1ed102d7e9cff0534f10ecbf021e09d3a8782098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## Multiple append() and prepend() in `environment()` object

`append()` and `prepend()` methods can now be called multiple times
on the same `varname`. Earlier Meson versions would warn and only the last
opperation was taking effect.

```meson
env = environment()

# MY_PATH will be '0:1:2:3'
env.set('MY_PATH', '1')
env.append('MY_PATH', '2')
env.append('MY_PATH', '3')
env.prepend('MY_PATH', '0')
```