imperative
imperative copied to clipboard
mergeArgsForProfile gives argValue in "missingArgs
const mergedArgs = profInfo.mergeArgsForProfile(profAttrs, { getSecureVals: true });
for (const arg of mergedArgs.knownArgs) {
profile[arg.argName] = arg.argValue;
}
console.log(mergedArgs.missingArgs);
Yields:
0:{argName: 'user', dataType: 'string', argValue: undefined, argLoc: {…}, secure: true}
1:{argName: 'basePath', dataType: 'string', argValue: undefined, argLoc: {…}, secure: undefined}
2:{argName: 'protocol', dataType: 'string', argValue: 'https', argLoc: {…}, secure: undefined}
protocol
has a value https
but is in the missingArgs
array. here is a sample project config:
{
"$schema": "./zowe.schema.json",
"profiles": {
"sample": {
"type": "sample",
"properties": {
"host": "localhost",
"rejectUnauthorized": false,
"port": 10080,
// "user": "zowe",
"password": "zowe",
},
}
},
"defaults": {
"sample": "sample"
},
"plugins": []
}