fix: suppress non-fatal module post-install script errors
Post-install scripts fail due to CJS/ESM incompatibility but module files are already copied successfully. Silently catch the error instead of showing a warning that alarms users into thinking installation failed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e27327d343
commit
e55808ec31
|
|
@ -1327,11 +1327,12 @@ class ModuleManager {
|
||||||
await prompts.log.warn(`Module installer for ${moduleName} returned false`);
|
await prompts.log.warn(`Module installer for ${moduleName} returned false`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
await prompts.log.warn(
|
// Post-install scripts are optional; module files are already installed.
|
||||||
`Post-install script for ${moduleName} could not run: ${error.message}\n` +
|
// TODO: Eliminate post-install scripts entirely by adding a `directories` key
|
||||||
` The module itself was installed successfully. The post-install script is optional.`,
|
// to module.yaml that declares which config keys are paths to auto-create.
|
||||||
);
|
// The main installer can then handle directory creation centrally, removing
|
||||||
|
// the need for per-module installer.js scripts and their CJS/ESM issues.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue