fix: should not warn the user in case hfs-installed.zip is missing on update

Massimo Melina committed Nov 1, 2025 at 10:27 UTC 9a332e7c06bc558f67000e5c93bd76c89fb0e7ac
2 files changed +3 -3
admin/src/ArrayField.ts
+1 -1
@@ -11,7 +11,7 @@ import { DataTable, DataTableColumn } from './DataTable'
11
12 type ArrayFieldProps<T> = FieldProps<T[] | Dict<T>> & {
13 fields: Functionable<FieldDescriptor[] & {
14 - $width?: number,
14 + $width?: number, // 8 or more is px, less is flex
15 $column?: Partial<DataTableColumn>,
16 $type?: string
17 $hideUnder?: DataTableColumn['hideUnder'],
src/update.ts
+2 -2
@@ -154,7 +154,7 @@ export async function update(tagOrUrl: string='') {
154 const { mode } = await stat(bin)
155 await chmod(newBin, mode).catch(console.error)
156 }
157 - await rename(INSTALLED_FN, PREVIOUS_FN).catch(console.warn)
157 + await rename(INSTALLED_FN, PREVIOUS_FN).catch(e => e?.code !== 'ENOENT' && console.warn(String(e)))
158 await rename(LOCAL_UPDATE, INSTALLED_FN).catch(console.warn)
159 onProcessExit(() => {
160 const oldBinFile = 'old-' + binFile
@@ -189,7 +189,7 @@ if (argv.updating) { // we were launched with a temporary name, restore original
189 onProcessExit(() =>
190 launch(dest, ['--updated', '--cwd .']) ) // launch+sync here would cause old process to stay open, locking ports
191 else {
192 - /* open() is the only consistent way that i could find working on Mac that preserved console input/output over relaunching,
192 + /* open() is the only consistent way that I could find working on macos preserving console input/output over relaunching,
193 * but I couldn't find a way to pass parameters, at least on Linux. The workaround I'm using is to write them to a temp file, that's read and deleted at restart.
194 * For the record, on mac you can: write "./hfs arg1 arg2" to /tmp/tmp.sh with 0o700, and then spawn "open -a Terminal /tmp/tmp.sh"
195 */