applyExtraCACertsFromConfig function
void
applyExtraCACertsFromConfig({})
Apply NODE_EXTRA_CA_CERTS from settings to the environment early in init.
This is safe to call before the trust dialog because we only read from user-controlled files (~/.neomage/settings.json and ~/.neomage.json).
Implementation
void applyExtraCACertsFromConfig({
required Map<String, String>? Function() getGlobalConfigEnv,
required Map<String, String>? Function() getUserSettingsEnv,
}) {
if (Platform.environment['NODE_EXTRA_CA_CERTS'] != null) return;
final path = _getExtraCertsPathFromConfig(
getGlobalConfigEnv: getGlobalConfigEnv,
getUserSettingsEnv: getUserSettingsEnv,
);
if (path != null) {
// In Dart we can't directly set process.env, but we store it for later use
_appliedExtraCACertsPath = path;
}
}