1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Fixed boolean op with empty context issue

This commit is contained in:
Mike Farah
2021-05-09 12:44:05 +10:00
parent 25d0787011
commit 37f3e21970
6 changed files with 111 additions and 14 deletions

View File

@@ -93,3 +93,31 @@ will output
true
```
## Non exisitant key doesn't equal a value
Given a sample.yml file of:
```yaml
a: frog
```
then
```bash
yq eval 'select(.b != "thing")' sample.yml
```
will output
```yaml
a: frog
```
## Two non existant keys are equal
Given a sample.yml file of:
```yaml
a: frog
```
then
```bash
yq eval 'select(.b == .c)' sample.yml
```
will output
```yaml
a: frog
```