mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 11:24:35 +00:00
chore(execution): add includePrintOutput to ExecuteFileParams
This commit is contained in:
@@ -63,7 +63,7 @@ const executeCode = async (
|
||||
vars: { ...req.query, _debug: 131 },
|
||||
otherArgs: { userAutoExec },
|
||||
runTime: runTime,
|
||||
addPrintOutput: true
|
||||
includePrintOutput: true
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
@@ -29,11 +29,11 @@ interface ExecuteFileParams {
|
||||
session?: Session
|
||||
runTime: RunTimeType
|
||||
forceStringResult?: boolean
|
||||
addPrintOutput?: boolean
|
||||
}
|
||||
|
||||
interface ExecuteProgramParams extends Omit<ExecuteFileParams, 'programPath'> {
|
||||
program: string
|
||||
includePrintOutput?: boolean
|
||||
}
|
||||
|
||||
export class ExecutionController {
|
||||
@@ -69,7 +69,7 @@ export class ExecutionController {
|
||||
session: sessionByFileUpload,
|
||||
runTime,
|
||||
forceStringResult,
|
||||
addPrintOutput
|
||||
includePrintOutput
|
||||
}: ExecuteProgramParams): Promise<ExecuteReturnRaw> {
|
||||
const sessionController = getSessionController(runTime)
|
||||
|
||||
@@ -131,7 +131,7 @@ export class ExecutionController {
|
||||
resultParts.push(process.logsUUID)
|
||||
resultParts.push(log)
|
||||
|
||||
if (addPrintOutput && runTime === RunTimeType.SAS) {
|
||||
if (includePrintOutput && runTime === RunTimeType.SAS) {
|
||||
const printOutputPath = path.join(session.path, 'output.lst')
|
||||
const printOutput = (await fileExists(printOutputPath))
|
||||
? await readFile(printOutputPath)
|
||||
|
||||
Reference in New Issue
Block a user