Skip to content

Commit 2fd995c

Browse files
committed
Made west narrow false by default with an option in settings to make it true
1 parent e8e1beb commit 2fd995c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
],
6464
"default": false,
6565
"description": "Display gui config instead of menu config in Project Tree View"
66+
},
67+
"zephyr-ide.westNarrowUpdate": {
68+
"type": ["boolean"],
69+
"default": false,
70+
"description": "If true, uses 'west update --narrow'. If false, uses 'west update' without --narrow."
6671
}
6772
}
6873
},

src/setup_utilities/west-operations.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ export async function westUpdate(context: vscode.ExtensionContext, wsConfig: Wor
112112
return false;
113113
}
114114

115+
115116
wsConfig.activeSetupState.westUpdated = false;
116117
wsConfig.activeSetupState.zephyrDir = "";
117118
wsConfig.activeSetupState.zephyrVersion = undefined;
118119
saveSetupState(context, wsConfig, globalConfig);
119120

120-
let cmd = `west update --narrow`;
121+
// Read config option from settings.json
122+
const configuration = vscode.workspace.getConfiguration('zephyr-ide');
123+
const useNarrowUpdate = configuration.get<boolean>('westNarrowUpdate', false); // default false
124+
let cmd = useNarrowUpdate ? 'west update --narrow' : 'west update';
121125
let westUpdateRes = await executeTaskHelperInPythonEnv(wsConfig.activeSetupState, "Zephyr IDE: West Update", cmd, wsConfig.activeSetupState.setupPath);
122126

123127
if (!westUpdateRes) {

0 commit comments

Comments
 (0)