@vantaloom/cli 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.mjs +7 -4
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -292,7 +292,10 @@ async function applyPackage(packageRoot, prefix, options) {
|
|
|
292
292
|
async function syncFromNpmRegistry(options, action) {
|
|
293
293
|
const prefix = safeDirectory(options.prefix ?? defaultPrefix())
|
|
294
294
|
const installedConfig = readInstalledConfig(prefix)
|
|
295
|
-
|
|
295
|
+
// Always derive runtimePackage from current platform — never trust stale config
|
|
296
|
+
// from a different platform (e.g. win32 config baked into a darwin package).
|
|
297
|
+
// Only explicit --runtime-package flag can override.
|
|
298
|
+
const runtimePackage = options.runtimePackage || runtimePackageName(platformId())
|
|
296
299
|
const runtimeVersion = options.runtimeVersion || installedConfig.runtimeVersion || "latest"
|
|
297
300
|
const explicitRegistry = options.npmRegistry || installedConfig.npmRegistry
|
|
298
301
|
const registry = normalizeRegistry(explicitRegistry || detectNpmRegistry() || defaultNpmRegistry)
|
|
@@ -634,9 +637,9 @@ function mergeRuntimeConfig(packageConfig, existingConfig, overrides) {
|
|
|
634
637
|
if (!merged.releaseTag) {
|
|
635
638
|
merged.releaseTag = defaultReleaseTag
|
|
636
639
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
+
// Always force runtimePackage to match the running platform — a cross-compiled
|
|
641
|
+
// package may carry a config for a different platform (e.g. win32 inside darwin).
|
|
642
|
+
merged.runtimePackage = runtimePackageName(platformId())
|
|
640
643
|
if (!merged.runtimeVersion) {
|
|
641
644
|
merged.runtimeVersion = "latest"
|
|
642
645
|
}
|