1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 11:44:34 +00:00

fix: use env if provided for desktop mode

This commit is contained in:
Saad Jutt
2021-12-15 18:24:04 +05:00
parent e11a4b66e7
commit d19ce253b4
6 changed files with 22 additions and 14 deletions

View File

@@ -5,8 +5,10 @@ import { createFolder, fileExists, folderExists } from '@sasjs/utils'
const isWindows = () => process.platform === 'win32'
export const getDesktopFields = async () => {
const sasLoc = await getSASLocation()
const driveLoc = await getDriveLocation()
const { SAS_PATH, DRIVE_PATH } = process.env
const sasLoc = SAS_PATH ?? (await getSASLocation())
const driveLoc = DRIVE_PATH ?? (await getDriveLocation())
return { sasLoc, driveLoc }
}