Refactor macappupdate.js to streamline imports and improve code clarity
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Replaced the use of createRequire with a direct import for the '@vscode/sudo-prompt' module.
- Removed unnecessary whitespace for cleaner code formatting.
This commit is contained in:
Tom Butcher 2026-08-02 00:41:15 +01:00
parent 613cb7712d
commit 37fe489b07

View File

@ -1,9 +1,6 @@
import { promises as fs } from 'fs' import { promises as fs } from 'fs'
import { createRequire } from 'module'
import path from 'path' import path from 'path'
import sudo from '@vscode/sudo-prompt'
const require = createRequire(import.meta.url)
const sudo = require('@vscode/sudo-prompt')
const quoteShellArg = (value) => `'${String(value).replaceAll("'", "'\\''")}'` const quoteShellArg = (value) => `'${String(value).replaceAll("'", "'\\''")}'`