mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
fix(config.ts): ensure setConfig is only called when there are entries to set to prevent unnecessary function calls
feat(run.ts): add conditional to skip migrations if OCO_AI_PROVIDER is set to TEST to improve migration handling during testing
This commit is contained in:
@@ -30151,7 +30151,8 @@ var setDefaultConfigValues = (config7) => {
|
||||
if (config7[key] === "undefined")
|
||||
entriesToSet.push(entry);
|
||||
}
|
||||
setConfig(entriesToSet);
|
||||
if (entriesToSet.length > 0)
|
||||
setConfig(entriesToSet);
|
||||
};
|
||||
var setGlobalConfig = (config7, configPath = defaultConfigPath) => {
|
||||
(0, import_fs.writeFileSync)(configPath, (0, import_ini.stringify)(config7), "utf8");
|
||||
@@ -45731,7 +45732,11 @@ var runMigrations = async () => {
|
||||
}
|
||||
}
|
||||
if (isMigrated) {
|
||||
ce("Migrations to your config were applied successfully. Please rerun.");
|
||||
ce(
|
||||
`${source_default.green(
|
||||
"\u2714"
|
||||
)} Migrations to your config were applied successfully. Please rerun.`
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48954,7 +48954,8 @@ var setDefaultConfigValues = (config6) => {
|
||||
if (config6[key] === "undefined")
|
||||
entriesToSet.push(entry);
|
||||
}
|
||||
setConfig(entriesToSet);
|
||||
if (entriesToSet.length > 0)
|
||||
setConfig(entriesToSet);
|
||||
};
|
||||
var setGlobalConfig = (config6, configPath = defaultConfigPath) => {
|
||||
(0, import_fs.writeFileSync)(configPath, (0, import_ini.stringify)(config6), "utf8");
|
||||
|
||||
Reference in New Issue
Block a user