support env HFS_DEBUG
Massimo Melina committed
Aug 28, 2025 at 10:50 UTC
f73a9b10e6b0c72aa2d3f6c5ba3c5515d6534daf
3 files changed
+4
-3
README.md
+1
@@ -132,6 +132,7 @@ If your language is missing, please consider [translating yourself](https://gith
132
- Type the name of a file/folder to focus it, and ctrl+backspace to go to parent folder
133
- `--consoleFile PATH` will output all stdout and stderr also to a file
134
- env `DISABLE_UPDATE=1` (for containers)
135
+- launch with `--debug` or env `HFS_DEBUG=1` to produce additional logs in console
136
137
## Contribute
138
admin/src/InstalledPlugins.ts
+2
-2
@@ -1,7 +1,7 @@
1
// This file is part of HFS - Copyright 2021-2023, Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt
2
3
import { apiCall, useApiEx, useApiList } from './api'
4
-import { createElement as h, Fragment, useEffect, useRef, useState } from 'react'
4
+import { createElement as h, Fragment, useEffect } from 'react'
5
import { Box, Breakpoint, Link, Paper, Table, TableCell, TableRow, useTheme } from '@mui/material'
6
import { DataTable, DataTableColumn } from './DataTable'
7
import {
@@ -38,7 +38,7 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
38
const theme = useTheme()
39
return h(DataTable, {
40
error: xlate(error, PLUGIN_ERRORS),
41
- rows: list.length ? list : [], // workaround for DataGrid bug causing 'no rows' message to be not displayed after 'loading' was also used
41
+ rows: list.length ? list : [], // workaround for DataGrid's bug causing 'no rows' message to be not displayed after 'loading' was also used
42
fillFlex: true,
43
initializing,
44
disableColumnSelector: true,
src/const.ts
+1
-1
@@ -42,7 +42,7 @@ if (DEV) {
42
console.clear()
43
process.env.DEBUG = 'acme-client'
44
}
45
-else if (!argv.debug) console.debug = ()=>{}
45
+else if (!argv.debug && !process.env.HFS_DEBUG) console.debug = ()=>{}
46
console.log(`HFS ~ HTTP File Server`)
47
console.log(`© Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt`)
48
console.log('started', formatTimestamp(HFS_STARTED), DEV)