Skip to content

Commit

Permalink
Stop writing an empty config file (#363)
Browse files Browse the repository at this point in the history
* Stop writing an empty config file

* fix build

---------

Co-authored-by: Ashton Eby <[email protected]>
  • Loading branch information
macmv and echo-bravo-yahoo authored Oct 16, 2024
1 parent a04bfad commit 83d6e29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions src/commands/project/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import fs from "fs";
import * as path from "path";
import {
PROJECT_FILE_NAME,
ProjectConfig,
ShellConfig,
fileExists,
getProjectConfigPath,
Expand Down Expand Up @@ -74,8 +73,6 @@ export class ProjectInitCommand extends Command {
);
}

ProjectConfig.initialConfig(schemaDir).save(projectPath);

const shellConfig = ShellConfig.readWithOverrides({
projectPath: projectPath,
});
Expand Down
4 changes: 1 addition & 3 deletions src/lib/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ export class ShellConfig {
const rootConfig =
opts?.rootConfig ?? ini.parse(readFileOpt(getRootConfigPath()));
const projectConfigPath = opts?.projectPath ?? getProjectConfigPath();
const projectConfig =
opts?.projectConfig ??
(projectConfigPath ? ini.parse(readFile(projectConfigPath)) : undefined);
const projectConfig = opts?.projectConfig ?? {};

return new ShellConfig({
rootConfig,
Expand Down

0 comments on commit 83d6e29

Please sign in to comment.