Skip to content

Commit

Permalink
fix: Wait for config store async functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas committed Jan 25, 2024
1 parent 39bf8fa commit 5cff10e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,13 @@ export class Init extends SwankyCommand<typeof Init> {
});

this.taskQueue.push({
task: () => {
this.storeConfig(this.projectPath);
this.storeSystemConfig();
task: async () => {
await this.storeConfig(this.projectPath);
await this.storeSystemConfig();
},
args: [],
runningMessage: "Writing config",
shouldExitOnError: true
});

for (const {
Expand Down
3 changes: 1 addition & 2 deletions src/commands/node/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export class InstallNode extends SwankyCommand<typeof InstallNode> {
};

await this.spinner.runCommand(
() =>
this.storeConfig(projectPath),
async () => await this.storeConfig(projectPath),
"Updating swanky config"
);

Expand Down

0 comments on commit 5cff10e

Please sign in to comment.