mirror of
https://github.com/sasjs/server.git
synced 2026-01-08 23:10:05 +00:00
fix(autoexec): usage in case of desktop from file
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import { createFolder } from '@sasjs/utils'
|
||||
import { getFilesFolder } from './file'
|
||||
import { createFile, createFolder, fileExists } from '@sasjs/utils'
|
||||
import { getDesktopUserAutoExecPath, getFilesFolder } from './file'
|
||||
import { ModeType } from './verifyEnvVariables'
|
||||
|
||||
export const setupFolders = async () => {
|
||||
const drivePath = getFilesFolder()
|
||||
await createFolder(drivePath)
|
||||
|
||||
if (process.env.MODE === ModeType.Desktop) {
|
||||
if (!(await fileExists(getDesktopUserAutoExecPath()))) {
|
||||
await createFile(getDesktopUserAutoExecPath(), '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user