refactor(core): remove unnecessary auto-config double call
MODIFY
internal/core/client/commands/autoConfig.ts
internal/core/client/commands/autoConfig.ts
@@ -45,21 +45,12 @@ export default createLocalCommand({
return false;
}
- const res = await req.client.query(
- {
- commandName: "auto-config",
- },
- "server",
+ const data = consumeUnknown(
+ result.data,
+ DIAGNOSTIC_CATEGORIES.parse,
+ "json",
);
- if (res.type !== "SUCCESS") {
- reporter.log(
- markup`Something went wrong during the execution of the command.`,
- );
- return true;
- }
- const data = consumeUnknown(res.data, DIAGNOSTIC_CATEGORIES.parse, "json");
-
if (!data.exists()) {
reporter.log(markup`No problems or updates found in you project.`);
return true;

MODIFY
internal/core/server/commands/autoConfig.ts
internal/core/server/commands/autoConfig.ts
@@ -75,7 +75,7 @@ export default createServerCommand<Flags>({
});
}
}
- } else {
+ }
// Generate files
await reporter.steps([
{
@@ -110,7 +110,6 @@ export default createServerCommand<Flags>({
},
},
]);
- }
return result;
},

refactor(core): remove unnecessary auto-config double call (#1612)