Skip to content

Commit

Permalink
Await project type detection
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 22, 2023
1 parent b8c7b7b commit 6c6f3af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/lib/cli/src/detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export async function detect(
options: { force?: boolean; html?: boolean } = {}
) {
const packageJson = await packageManager.retrievePackageJson();

if (!packageJson) {
return ProjectType.UNDETECTED;
}
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async function doInitiate(options: CommandOptions, pkg: PackageJson): Promise<vo
}
} else {
try {
projectType = detect(packageManager, options);
projectType = await detect(packageManager, options);
} catch (err) {
done(err.message);
throw new HandledError(err);
Expand Down

0 comments on commit 6c6f3af

Please sign in to comment.