Skip to content

Commit e9cfda3

Browse files
authored
bugFix: Cannot create project with no build tools (#280)
1 parent d2d70f0 commit e9cfda3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/controllers/projectController.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ProjectController implements Disposable {
4141
}
4242

4343
if (choice.metadata.type === ProjectType.NoBuildTool) {
44-
await scaffoldSimpleProject();
44+
await scaffoldSimpleProject(this.context);
4545
} else if (choice.metadata.createCommandId) {
4646
await commands.executeCommand(choice.metadata.createCommandId);
4747
}
@@ -100,7 +100,7 @@ async function promptInstallExtension(projectType: string, metaData: IProjectTyp
100100
}
101101
}
102102

103-
async function scaffoldSimpleProject(): Promise<void> {
103+
async function scaffoldSimpleProject(context: ExtensionContext): Promise<void> {
104104
const workspaceFolder = Utility.getDefaultWorkspaceFolder();
105105
const location: Uri[] | undefined = await window.showOpenDialog({
106106
defaultUri: workspaceFolder && workspaceFolder.uri,
@@ -132,7 +132,7 @@ async function scaffoldSimpleProject(): Promise<void> {
132132
}
133133

134134
const projectRoot: string = path.join(basePath, projectName);
135-
const templateRoot: string = path.join(this.context.extensionPath, "templates", "invisible-project");
135+
const templateRoot: string = path.join(context.extensionPath, "templates", "invisible-project");
136136
try {
137137
await fse.ensureDir(projectRoot);
138138
await fse.copy(templateRoot, projectRoot);

0 commit comments

Comments
 (0)