1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-06 14:10:06 +00:00

fix: code fixes for executing program from program path including file extension

This commit is contained in:
2022-06-15 16:18:07 +05:00
parent 81501d17ab
commit 53854d0012
4 changed files with 45 additions and 14 deletions

View File

@@ -32,7 +32,17 @@ export class FileUploadController {
const programPath = (query?._program ?? body?._program) as string
const { runTime } = await getRunTimeAndFilePath(programPath)
let runTime
try {
;({ runTime } = await getRunTimeAndFilePath(programPath))
} catch (err: any) {
res.status(400).send({
status: 'failure',
message: 'Job execution failed',
error: typeof err === 'object' ? err.toString() : err
})
}
const sessionController =
runTime === RunTimeType.SAS