message: Fix Parse chktex stdout if exitcode returns 1 for active file
diff: @@ -31,8 +31,12 @@ export class Linter {
  try {
  stdout = await this.processWrapper('active file', command, args.concat(requiredArgs).filter(arg => arg !== ''), {}, content)
  } catch (err) {
  + if ('stdout' in err) {
  + stdout = err.stdout
  + } else {
  return
  }
  + }
  // provide the original path to the active file as the second argument, so
  // we report this second path in the diagnostics instead of the temporary one.
  this.extension.parser.parseLinter(stdout, filePath)
  @@ -51,9 +55,14 @@ export class Linter {
  try {
  stdout = await this.processWrapper('root file', command, args.concat(requiredArgs).filter(arg => arg !== ''), {cwd: path.dirname(this.extension.manager.rootFile)})
  } catch (err) {
  + if ('stdout' in err) {
  + stdout = err.stdout
  + } else {
  return
  }
  }
  + this.extension.parser.parseLinter(stdout)
  + }
  processWrapper(linterId: string, command: string, args: string[], options: SpawnOptions, stdin?: string) : Promise<string> {
  this.extension.logger.addLogMessage(`Linter for ${linterId} running command ${command} with arguments ${args}`)
  @@ -85,12 +94,10 @@ export class Linter {
  proc.on('exit', exitCode => {
  if (exitCode !== 0) {
  this.extension.logger.addLogMessage(`Linter for ${linterId} failed with exit code ${exitCode} and error:\n ${stderr}`)
  - this.extension.parser.parseLinter(stdout)
  return reject({ exitCode, stdout, stderr})
  } else {
  const [s, ms] = process.hrtime(startTime)
  this.extension.logger.addLogMessage(`Linter for ${linterId} successfully finished in ${s}s ${Math.round(ms / 1000000)}ms`)
  - this.extension.parser.parseLinter(stdout)
  return resolve(stdout)
  }
  })
  