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

chore: provide sas executable to docker

This commit is contained in:
Saad Jutt
2021-11-16 05:07:22 +05:00
parent f030aa1516
commit 357bccce01
10 changed files with 68 additions and 36 deletions

View File

@@ -1,6 +1,5 @@
import path from 'path'
import { Session } from '../../types'
import { configuration } from '../../../package.json'
import { promisify } from 'util'
import { execFile } from 'child_process'
import { getTmpSessionsFolderPath, generateUniqueFileName } from '../../utils'
@@ -65,8 +64,8 @@ export class SessionController {
// update the session array to say that it is currently running
// however we also need a promise so that we can update the
// session array to say that it has (eventually) finished.
const sasLoc = process.sasLoc ?? configuration.sasPath
execFilePromise(sasLoc, [
execFilePromise(process.sasLoc, [
'-SYSIN',
codePath,
'-LOG',
@@ -84,7 +83,7 @@ export class SessionController {
.catch((err) => {
session.completed = true
session.crashed = err.toString()
console.log('session crashed', session.id, err)
console.log('session crashed', session.id)
})
// we have a triggered session - add to array