@@ -13,6 +13,7 @@ import {LoginWizard} from "../configuration/LoginWizard";
1313import { CliWrapper } from "../cli/CliWrapper" ;
1414import { getSubProjects } from "./BundleFileSet" ;
1515import { tmpdir } from "os" ;
16+ import { ShellUtils } from "../utils" ;
1617
1718export async function promptToOpenSubProjects (
1819 projects : { absolute : Uri ; relative : Uri } [ ]
@@ -141,7 +142,12 @@ export class BundleInitWizard {
141142 name : "Databricks Project Init" ,
142143 isTransient : true ,
143144 location : TerminalLocation . Editor ,
144- env : this . cli . getBundleInitEnvVars ( authProvider ) ,
145+ env : {
146+ // Without supplying full environment and with `strictEnv: true` PowerShell will fail to start.
147+ // On unix-like systems we don't require full environment, but it doesn't hurt.
148+ ...process . env ,
149+ ...this . cli . getBundleInitEnvVars ( authProvider ) ,
150+ } ,
145151 // Without strict env we will inherit our environmentVariableCollection
146152 // which will override auth env vars we provide in this call.
147153 strictEnv : true ,
@@ -156,7 +162,7 @@ export class BundleInitWizard {
156162 this . cli . escapePathArgument ( parentFolder . fsPath ) ,
157163 ] . join ( " " ) ;
158164 const initialPrompt = `clear; echo "Executing: databricks ${ args } \nFollow the steps below to create your new Databricks project.\n"` ;
159- const finalPrompt = `echo "Press any key to close the terminal and continue ..."; read ; exit` ;
165+ const finalPrompt = `echo "\nPress any key to close the terminal and continue ..."; ${ ShellUtils . readCmd ( ) } ; exit` ;
160166 terminal . sendText (
161167 `${ initialPrompt } ; ${ this . cli . cliPath } ${ args } ; ${ finalPrompt } `
162168 ) ;
0 commit comments