Skip to content

Commit 3bb953e

Browse files
authored
Improve bundle init (#1041)
Fixes an problem where an existing bundle configuration can interfere with the bundle init command
1 parent 76c33fd commit 3bb953e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/databricks-vscode/src/bundle/BundleInitWizard.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {LoginWizard} from "../configuration/LoginWizard";
1313
import {CliWrapper} from "../cli/CliWrapper";
1414
import {ConfigModel} from "../configuration/models/ConfigModel";
1515
import {getSubProjects} from "./BundleFileSet";
16+
import {tmpdir} from "os";
1617

1718
export async function promptToOpenSubProjects(
1819
projects: {absolute: Uri; relative: Uri}[]
@@ -146,6 +147,9 @@ export class BundleInitWizard {
146147
isTransient: true,
147148
location: TerminalLocation.Editor,
148149
env: this.cli.getBundleInitEnvVars(authProvider),
150+
// Setting CWD avoids a possibility of the CLI picking up unrelated bundle configuration
151+
// in the current workspace root or while traversing up the folder structure.
152+
cwd: tmpdir(),
149153
});
150154
const args = [
151155
"bundle",

0 commit comments

Comments
 (0)