mirror of https://github.com/databricks/cli.git
8255c9d9fb
## Changes While working on #1273, I found that calls to `Append` on a `dyn.Pattern` were mutating the original slice. This is expected because appending to a slice will mutate in place if the capacity of the original slice is large enough. This change updates the `Append` call on the `dyn.Path` as well to return a newly allocated slice to avoid inadvertently mutating the originals. We have existing call sites in the `dyn` package that mutate a `dyn.Path` (e.g. walk or visit) and these are modified to continue to do this with a direct call to `append`. Callbacks that use the `dyn.Path` argument outside of the callback need to make a copy to ensure it isn't mutated (this is no different from existing semantics). The `Join` function wasn't used and is removed as part of this change. ## Tests Unit tests. |
||
---|---|---|
.. | ||
auth | ||
cmdgroup | ||
cmdio | ||
databrickscfg | ||
diag | ||
dyn | ||
env | ||
errs | ||
exec | ||
filer | ||
fileset | ||
flags | ||
folders | ||
git | ||
jsonschema | ||
locker | ||
log | ||
notebook | ||
process | ||
python | ||
set | ||
sync | ||
tags | ||
template | ||
terraform | ||
testfile | ||
textutil |