From 715b1dec68377eefe03aa8203a73debe77842436 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Wed, 6 Oct 2021 08:16:24 +0300 Subject: [PATCH] fix(executor): fix nosplash argument and api response --- src/controllers/sas.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/sas.ts b/src/controllers/sas.ts index 1f145cc..7425d03 100644 --- a/src/controllers/sas.ts +++ b/src/controllers/sas.ts @@ -18,7 +18,7 @@ export const processSas = async (query: ExecutionQuery): Promise => { .replace(new RegExp('/', 'g'), path.sep) if (!(await fileExists(sasCodePath))) { - return Promise.reject('SAS file does not exist.') + return Promise.reject({ error: 'SAS file does not exist.' }) } const sasFile: string = sasCodePath.split(path.sep).pop() || 'default' @@ -54,7 +54,7 @@ export const processSas = async (query: ExecutionQuery): Promise => { tmpSasCodePath, '-log', sasLogPath, - '-nosplash' // FIXME: should be configurable + process.platform === 'win32' ? '-nosplash' : '' ]).catch((err) => ({ stderr: err, stdout: '' })) let log = '' @@ -78,12 +78,12 @@ export const processSas = async (query: ExecutionQuery): Promise => { if (debug && (query as any)[debug] >= 131) { webout = ` - >>weboutBEGIN<< ${webout} >>weboutEND<< -
-

SAS Log

-
${log}
-
- ` +${webout} +
+

SAS Log

+
${log}
+
+` } return Promise.resolve(webout)