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)