feat(gateway): honor MOSAIC_GATEWAY_SKIP_NPM_INSTALL to skip registry reinstall
Lets dev/offline installs keep an already-present global @mosaicstack/gateway (e.g. a build-from-source `install.sh --dev`) instead of overwriting it with the registry @latest build during `mosaic wizard` / `mosaic gateway install`. Refs #675 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMoEx7hfdFGjUiCHuN1RRi
This commit is contained in:
@@ -294,7 +294,12 @@ export async function gatewayConfigStage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Install the gateway npm package on first install or after failure.
|
// Install the gateway npm package on first install or after failure.
|
||||||
if (!opts.skipInstall && !daemonRunning) {
|
// MOSAIC_GATEWAY_SKIP_NPM_INSTALL=1 forces a skip even without opts.skipInstall:
|
||||||
|
// used by dev/offline installs where @mosaicstack/gateway is already present
|
||||||
|
// globally (e.g. a build-from-source `install.sh --dev`) and must not be
|
||||||
|
// overwritten by the registry @latest build.
|
||||||
|
const skipNpmInstall = opts.skipInstall || process.env['MOSAIC_GATEWAY_SKIP_NPM_INSTALL'] === '1';
|
||||||
|
if (!skipNpmInstall && !daemonRunning) {
|
||||||
installGatewayPackage();
|
installGatewayPackage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user