Skip to content

Commit 2195eb9

Browse files
committed
fix: work dir on single line
1 parent 6e46440 commit 2195eb9

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

client/src/connection/ssh/index.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,7 @@ export class SSHSession extends Session {
204204
};
205205

206206
private fetchWorkDirectory = (line: string): string => {
207-
let foundWorkDirectory = "";
208-
if (
209-
!line.includes(`%put ${WORK_DIR_START_TAG};`) &&
210-
!line.includes(`%put &workDir;`) &&
211-
!line.includes(`%put ${WORK_DIR_END_TAG};`)
212-
) {
213-
foundWorkDirectory = this._workDirectoryParser.processLine(line);
214-
} else {
215-
// If the line is the put statement, we don't need to log that
216-
return;
217-
}
207+
const foundWorkDirectory = this._workDirectoryParser.processLine(line);
218208
// We don't want to output any of the captured lines
219209
if (this._workDirectoryParser.isCapturingLine()) {
220210
return;
@@ -225,9 +215,7 @@ export class SSHSession extends Session {
225215

226216
private resolveSystemVars = (): void => {
227217
const code = `%let workDir = %sysfunc(pathname(work));
228-
%put ${WORK_DIR_START_TAG};
229-
%put &workDir;
230-
%put ${WORK_DIR_END_TAG};
218+
%put ${WORK_DIR_START_TAG}&workDir${WORK_DIR_END_TAG};
231219
%let rc = %sysfunc(dlgcdir("&workDir"));
232220
run;
233221
`;

0 commit comments

Comments
 (0)