@@ -307,9 +307,9 @@ export async function workspaceSetupStandard(context: vscode.ExtensionContext, w
307
307
* Handle external installation configuration and setup
308
308
*/
309
309
async function handleExternalInstallation (
310
- context : vscode . ExtensionContext ,
311
- wsConfig : WorkspaceConfig ,
312
- globalConfig : GlobalConfig ,
310
+ context : vscode . ExtensionContext ,
311
+ wsConfig : WorkspaceConfig ,
312
+ globalConfig : GlobalConfig ,
313
313
westConfigResult : WestConfigResult
314
314
) : Promise < boolean > {
315
315
const externalPath = westConfigResult . externalInstallPath ! ;
@@ -328,7 +328,7 @@ async function handleExternalInstallation(
328
328
} else {
329
329
vscode . window . showInformationMessage ( `Workspace linked to external Zephyr installation at: ${ externalPath } ` ) ;
330
330
}
331
-
331
+
332
332
return true ;
333
333
}
334
334
@@ -788,6 +788,10 @@ export async function westConfig(
788
788
case 'create-new-west-yml' :
789
789
// Run west selector to create new west.yml
790
790
output . appendLine ( `[WEST CONFIG] Running west selector to create new west.yml...` ) ;
791
+ // Ensure setup state is initialized so westSelector has a valid destination path
792
+ if ( ! wsConfig . activeSetupState || ! wsConfig . activeSetupState . setupPath ) {
793
+ await setSetupState ( context , wsConfig , globalConfig , baseDir ) ;
794
+ }
791
795
const westSelection = await westSelector ( context , wsConfig ) ;
792
796
if ( ! westSelection || westSelection . failed ) {
793
797
return { cancelled : true , option : null } ;
0 commit comments