mirror of https://github.com/databricks/cli.git
Compare commits
1 Commits
11eadba81b
...
2f7f470395
Author | SHA1 | Date |
---|---|---|
shreyas-goenka | 2f7f470395 |
|
@ -44,11 +44,6 @@ func (m *prependWorkspacePrefix) Apply(ctx context.Context, b *bundle.Bundle) di
|
||||||
return dyn.InvalidValue, fmt.Errorf("expected string, got %s", v.Kind())
|
return dyn.InvalidValue, fmt.Errorf("expected string, got %s", v.Kind())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip prefixing if the path does not start with /, it might be variable reference or smth else.
|
|
||||||
if !strings.HasPrefix(path, "/") {
|
|
||||||
return pv, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, prefix := range skipPrefixes {
|
for _, prefix := range skipPrefixes {
|
||||||
if strings.HasPrefix(path, prefix) {
|
if strings.HasPrefix(path, prefix) {
|
||||||
return pv, nil
|
return pv, nil
|
||||||
|
|
|
@ -31,14 +31,6 @@ func TestPrependWorkspacePrefix(t *testing.T) {
|
||||||
path: "/Volumes/Users/test",
|
path: "/Volumes/Users/test",
|
||||||
expected: "/Volumes/Users/test",
|
expected: "/Volumes/Users/test",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "~/test",
|
|
||||||
expected: "~/test",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "${workspace.file_path}/test",
|
|
||||||
expected: "${workspace.file_path}/test",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
|
Loading…
Reference in New Issue