Skip to content

Commit 20ccd36

Browse files
azp: do not ask for optional pipeline parameters by default (#632)
1 parent e26f269 commit 20ccd36

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/azure-pipelines-vscode-ext/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ function activate(context) {
217217
let isRequired = def === null || def === undefined || def === "null";
218218
if(isRequired) {
219219
def = null;
220+
} else if(!handle.enableAskOptionalParameters) {
221+
return;
220222
}
221223
if(type === null) {
222224
if(handle.askForInput && handle?.customConfig?.parameters && name in handle.customConfig.parameters) {
@@ -420,7 +422,7 @@ function activate(context) {
420422
return;
421423
}
422424
return await error(pex.Message);
423-
}), referencedFiles: [], refToUri: {}, task: task, askForInput: !skipAskForInput };
425+
}), referencedFiles: [], refToUri: {}, task: task, askForInput: !skipAskForInput, enableAskOptionalParameters: vscode.workspace.getConfiguration("azure-pipelines-vscode-ext").get("enable-ask-optional-parameters")};
424426
if(!syntaxOnly && !schema) {
425427
var uri = handle.base.with({ path: joinPath(handle.base.path, filename) });
426428
var scontent = null;

src/azure-pipelines-vscode-ext/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@
158158
"default": false,
159159
"scope": "window",
160160
"description": "Create task log files in VSCode Output Section to inspect the whole task log"
161+
},
162+
"azure-pipelines-vscode-ext.enable-ask-optional-parameters": {
163+
"type": "boolean",
164+
"default": false,
165+
"scope": "window",
166+
"description": "When enabled, prompts the user to enter values for optional parameters during pipeline validation or expansion."
161167
}
162168
}
163169
}

0 commit comments

Comments
 (0)