in src/tasks.ts [215:261]
function getCmd(): string {
let params = '';
// Path
if (path !== undefined && path !== '') {
params += ` -Path '${path}'`;
} else {
params += " -Path './.ps-rule/'";
}
if (inputPath !== undefined && inputPath !== '') {
params += ` -InputPath '${inputPath}'`;
} else {
params += ` -InputPath .`;
}
// Baseline
if (baseline !== undefined && baseline !== '') {
params += ` -Baseline '${baseline}'`;
}
// Modules
if (modules !== undefined && modules.length > 0) {
for (let i = 0; i < modules.length; i++) {
if (i > 0) {
params += `, ${modules[i]}`;
} else {
params += ` -Module ${modules[i]}`;
}
}
}
// Outcome
if (outcome !== undefined && outcome.length > 0) {
for (let i = 0; i < outcome.length; i++) {
if (i > 0) {
params += `, ${outcome[i]}`;
} else {
params += ` -Outcome ${outcome[i]}`;
}
}
} else {
params += ' -Outcome Fail, Error';
}
return `Assert-PSRule -Format File${params};`;
}