mirror of https://github.com/databricks/cli.git
Avoid duplicate entries in replacements list
This commit is contained in:
parent
5e48f9107c
commit
2ab6c0a77c
|
@ -76,7 +76,11 @@ func (r *ReplacementsContext) Set(old, new string) {
|
|||
if err == nil {
|
||||
encodedOld, err := json.Marshal(old)
|
||||
if err == nil {
|
||||
r.appendLiteral(trimQuotes(string(encodedOld)), trimQuotes(string(encodedNew)))
|
||||
encodedStrNew := trimQuotes(string(encodedNew))
|
||||
encodedStrOld := trimQuotes(string(encodedOld))
|
||||
if encodedStrNew != new || encodedStrOld != old {
|
||||
r.appendLiteral(encodedStrOld, encodedStrNew)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue