From b919f3cc9c851cf4291d1ec3804189f699df313f Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sat, 27 Apr 2024 15:24:00 +0100 Subject: [PATCH] shared use of `commander` between homebridge and UI --- CHANGELOG.md | 6 +++++- src/index.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f9166c81..cba95532e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,13 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file. ## v4.56.2 (2024-04-27) +### Fixed + +- shared use of `commander` between homebridge and UI + ### Other Changes -- Prepare for tags with prefex of `v` +- Prepare for tags with prefix of `v` - Update Discord Webhook - Update Pre Release Process diff --git a/src/index.ts b/src/index.ts index b2536d4a9..76636f3dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import { fork } from 'child_process'; import { resolve } from 'path'; -import { program } from 'commander'; +import { Command } from 'commander'; import { satisfies } from 'semver'; let homebridge: any; @@ -19,6 +19,7 @@ class HomebridgeConfigUi { process.env.UIX_STORAGE_PATH = homebridge.user.storagePath(); process.env.UIX_PLUGIN_NAME = config.name || 'homebridge-config-ui-x'; + const program = new Command(); program .allowUnknownOption() .option('-P, --plugin-path [path]', '', (p) => process.env.UIX_CUSTOM_PLUGIN_PATH = p)