diff --git a/powershell/plugins/create-commands-v2.ts b/powershell/plugins/create-commands-v2.ts index 56fd1ba428..fc9a06f095 100644 --- a/powershell/plugins/create-commands-v2.ts +++ b/powershell/plugins/create-commands-v2.ts @@ -393,7 +393,9 @@ export /* @internal */ class Inferrer { async addVariant(vname: string, body: Parameter | null, bodyParameterName: string, parameters: Array, operation: Operation, variant: CommandVariant, state: State, preOperations: Array | undefined, commandType?: CommandType): Promise { // beth: filter command description for New/Update command - const createOrUpdateRegex = /^(creates? or updates?)|^(creates?)|^(updates?)/i; + // positive test case: The operation to create or update the extension. + // negative test case: Starts an UpdateRun + const createOrUpdateRegex = /((create or update)|(creates or updates)|(create)|(update)|(creates)|(updates))([^a-zA-Z0-9])/gi; operation.language.default.description = operation.language.default.description.replace(createOrUpdateRegex, `${variant.action.capitalize()}`); const op = await this.addCommandOperation(vname, parameters, operation, variant, state, preOperations, commandType);