Skip to content

Commit 46773f7

Browse files
alexojegurobertsLando
andauthoredNov 27, 2023
fix: don't create STORE_DIR/logs if ZWAVEJS_LOGS_DIR is setted (#3439)
Co-authored-by: Daniel Lando <daniel.sorridi@gmail.com>
1 parent 2cd1e77 commit 46773f7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
 

‎api/config/app.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ config({ path: './.env.app' })
66
// config/app.js
77
export const title: string = 'Z-Wave JS UI'
88
export const storeDir: string = process.env.STORE_DIR || joinPath(true, 'store')
9-
export const logsDir: string = joinPath(storeDir, 'logs')
9+
export const logsDir: string =
10+
process.env.ZWAVEJS_LOGS_DIR || joinPath(storeDir, 'logs')
1011
export const snippetsDir: string = joinPath(storeDir, 'snippets')
1112

1213
export const tmpDir: string = joinPath(storeDir, '.tmp')

‎api/lib/ZwaveClient.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,7 @@ export type SensorTypeScale = {
305305

306306
export type AllowedApis = (typeof allowedApis)[number]
307307

308-
const ZWAVEJS_LOG_FILE = utils.joinPath(
309-
process.env.ZWAVEJS_LOGS_DIR || logsDir,
310-
'zwavejs_%DATE%.log',
311-
)
308+
const ZWAVEJS_LOG_FILE = utils.joinPath(logsDir, 'zwavejs_%DATE%.log')
312309

313310
export type ZUIValueIdState = {
314311
text: string

0 commit comments

Comments
 (0)
Please sign in to comment.