Piotr Komborski
eb1acac350
Overwrite node if key exists
...
but value doesn't match or append if key does not exist
This fixes a bug with exploding anchors not overwriting nodes reported
in https://github.com/mikefarah/yq/issues/546
Test case:
```
a: &first_anchor
foo: bar
first: first
b: &second_anchor
foo: bazz
second: second
c:
<<: *first_anchor
<<: *second_anchor
```
Output:
```
a:
foo: bar
first: first
b:
foo: bazz
second: second
c:
foo: bazz
first: first
second: second
```
foo is properly overwritten by *second_anchor
2020-09-30 14:37:54 +01:00
Mike Farah
87550b7fe5
Show errors on validate
2020-09-21 20:34:29 +10:00
Mike Farah
5554301c29
Updated install instructions, added wget
2020-09-21 11:06:57 +10:00
Mike Farah
3b0aaac626
Added checksum hashes order to release
2020-09-18 16:37:45 +10:00
Mike Farah
65cb472604
Update README.md
2020-09-16 15:43:08 +10:00
Mike Farah
fbba38c9b7
Update README.md
2020-09-16 15:42:09 +10:00
Mike Farah
e5948c4f16
Fixed potential npe
2020-09-13 12:14:20 +10:00
Mike Farah
4eaadf98d0
Set STDOUT to default out when printing via cobra
2020-09-13 11:49:55 +10:00
Mike Farah
eedbb0a99f
Explode anchors now applies to map keys too
2020-09-13 11:26:07 +10:00
Mike Farah
7dabc57b65
Added array update merge example
2020-09-13 11:12:52 +10:00
Mike Farah
fcd3a90f67
Bumping minor version to indicate new merge features and slight backwards incompatibility
2020-09-13 11:06:56 +10:00
Mike Farah
88e99e5336
New line in docs for better readability
2020-09-13 11:04:48 +10:00
Mike Farah
a8cfccd3af
Merge master fix
2020-09-13 10:59:40 +10:00
Mike Farah
3355e80d85
Merge branch 'master' into new-merge2
2020-09-13 10:52:31 +10:00
Mike Farah
f528b28938
Convert to JSON now handles non string keys
2020-09-13 10:44:22 +10:00
Mike Farah
5b7b390a33
Force static linking
2020-09-13 10:32:45 +10:00
Mike Farah
4f12e09e78
More info on other installation methods
2020-09-13 10:16:24 +10:00
Mike Farah
ee732fbf0b
Added Alpine Linux instructions
2020-09-13 10:09:02 +10:00
Mike Farah
1507f929a2
Fixing version stuffup - now 3.3.4
2020-09-11 11:11:49 +10:00
Mike Farah
c11c3df84f
Version 3.2.3
2020-09-09 12:02:30 +10:00
Mike Farah
06bb3ac826
Can create new yaml files using scripts again
2020-09-09 11:02:00 +10:00
Mike Farah
778f8c6916
Removed doctools
2020-09-08 13:03:18 +10:00
Mike Farah
9f43a4a265
Keep comments when using the write commandt o update values
2020-09-08 09:46:04 +10:00
Mike Farah
bb6f07d147
Use latest go-lang
2020-09-08 09:43:11 +10:00
Mike Farah
759456e375
Lib version bumps
2020-09-08 09:13:57 +10:00
Mike Farah
5e59803037
Update README.md
2020-09-03 10:58:00 +10:00
Roberto Mier Escandon
a0cb691601
Bump version to 3.3.2
2020-08-16 13:02:07 +10:00
Mike Farah
fea8510061
Added comments merge strategy
2020-07-17 15:51:03 +10:00
Mike Farah
b380ea2892
better array merge strategy name
2020-07-17 13:27:27 +10:00
Mike Farah
d66a709213
refactored array merge flags into a strategy
2020-07-17 13:26:20 +10:00
Mike Farah
2fc39b3865
Can overwrite arrays when merging
2020-07-17 13:07:32 +10:00
Mike Farah
ee07edbd88
Added merge alias test
2020-06-18 09:56:36 +10:00
Mike Farah
b11661a1be
Refactored merge - will allow more sophisticated mergin
2020-06-18 09:44:36 +10:00
Mike Farah
eac218980e
Visit document node
2020-06-18 09:03:40 +10:00
Mike Farah
80e7f46538
Dont log mergePathStackToString - end up with duplicate logs
2020-06-18 09:03:40 +10:00
Mike Farah
086f0ec6b9
Update bug_report.md
2020-06-15 21:42:26 +10:00
Mike Farah
89cbe63343
Fixed deep read at root level
2020-06-15 12:31:13 +10:00
RyderXia
07cd3d4b8b
return error
2020-06-13 16:45:52 +10:00
RyderXia
b7b6988e76
mk TempDir
2020-06-13 16:45:52 +10:00
Mike Farah
9de2039c31
Version bump
2020-06-12 12:23:18 +10:00
Mike Farah
767709fef5
Fixed error flag
2020-06-12 12:21:46 +10:00
Mike Farah
d9ae8e1e5a
Updated readme
2020-06-12 09:30:05 +10:00
Mike Farah
b0fa0e5b86
added shell completion instructions
2020-06-11 18:50:38 +10:00
Mike Farah
6777d639c0
Fixed error handling
2020-06-11 18:30:45 +10:00
Mike Farah
de8dcff803
Added shell completions
2020-06-11 18:27:01 +10:00
Mike Farah
765ada4dc6
Bumping version
2020-06-11 15:01:18 +10:00
Mike Farah
1405584892
New,Update now support anchors and aliases
2020-06-11 13:57:13 +10:00
Mike Farah
8c9c326342
Usage error messages now go to StdErr
2020-06-11 10:14:33 +10:00
Mike Farah
e90b00957b
Added missing flow style
2020-06-11 09:58:10 +10:00
Mike Farah
71f5f76213
Delete now works with deep splat
2020-06-11 09:53:36 +10:00