mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-04 00:14:55 +08:00
strenv
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
## Read boolean environment variable as a string
|
||||
Running
|
||||
```bash
|
||||
myenv="true" yq eval --null-input 'strenv(myenv)'
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
12
|
||||
```
|
||||
|
||||
## Read numeric environment variable as a string
|
||||
Running
|
||||
```bash
|
||||
myenv="12" yq eval --null-input 'strenv(myenv)'
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
12
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user