diff --git a/client/src/connection/itc/LineParser.ts b/client/src/connection/itc/LineParser.ts index 002a44f3a..85c05da99 100644 --- a/client/src/connection/itc/LineParser.ts +++ b/client/src/connection/itc/LineParser.ts @@ -37,4 +37,9 @@ export class LineParser { public isCapturingLine(): boolean { return this.capturingLine; } + + public reset() { + this.capturingLine = false; + this.processedLines = []; + } } diff --git a/client/src/connection/itc/index.ts b/client/src/connection/itc/index.ts index 5e053e040..cc73c94a1 100644 --- a/client/src/connection/itc/index.ts +++ b/client/src/connection/itc/index.ts @@ -141,6 +141,7 @@ export class ITCSession extends Session { `$runner.Setup($profileHost,$username,$password,$port,$protocol,$serverName,$displayLang)\n`, this.onWriteComplete, ); + this._workDirectoryParser.reset(); this._shellProcess.stdin.write( "$runner.ResolveSystemVars()\n", this.onWriteComplete,