mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 02:03:24 +08:00
Fixing readonly ops not to modify context when paths dont exist
This commit is contained in:
@@ -60,3 +60,9 @@ func (n *Context) Clone() Context {
|
||||
}
|
||||
return clone
|
||||
}
|
||||
|
||||
func (n *Context) ReadOnlyClone() Context {
|
||||
clone := n.Clone()
|
||||
clone.DontAutoCreate = true
|
||||
return clone
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user