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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user