diff --git a/src/commands/doctor.ts b/src/commands/doctor.ts index 7ec5217d..66fca6cd 100644 --- a/src/commands/doctor.ts +++ b/src/commands/doctor.ts @@ -129,7 +129,9 @@ export default class Doctor extends SfCommand { ghIssue.body, diagnosis )}&labels=doctor,investigating,${this.config.bin}` - ); + ) + // # were not encoding correctly from encodeURI to be parsed in the issue body + .replace(/#/g, '%23'); await this.openUrl(url); } @@ -154,7 +156,7 @@ export default class Doctor extends SfCommand { const info = ` \`\`\` ${diagnosis.cliConfig.userAgent} -${(diagnosis.versionDetail.pluginVersions ?? []).join(EOL)} +${diagnosis.versionDetail.pluginVersions.join(EOL)} \`\`\` ${ diagnosis.sfdxEnvVars.length @@ -166,7 +168,6 @@ ${diagnosis.sfdxEnvVars.join(EOL)} ` : '' } - ${ diagnosis.sfEnvVars.length ? ` @@ -181,7 +182,6 @@ ${diagnosis.sfEnvVars.join(EOL)} Windows: ${diagnosis.cliConfig.windows} Shell: ${diagnosis.cliConfig.shell} Channel: ${diagnosis.cliConfig.channel} -${diagnosis.cliConfig.userAgent} \`\`\` --- ### Diagnostics @@ -193,8 +193,9 @@ ${this.doctor .join(EOL)} `; return body - .replace(new RegExp(`---(.|${EOL})*---${EOL}${EOL}`), '') - .replace(new RegExp(`${EOL}- Which shell/terminal (.|${EOL})*- Paste the output here`), info); + .replace(/---(?:.*\n)*>\s.*\n/gm, '') + .replace(/