Skip to content

Commit 31e733e

Browse files
authored
Fix creating a function app with no workspace open (#4061)
* add workspace check * more changes
1 parent d654250 commit 31e733e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/createFunctionApp/containerImage/detectDockerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function detectDockerfile(context: ICreateFunctionAppContext): Prom
2020
context.rootPath = workspacePath;
2121

2222
//check for host.json location
23-
if (!(await isFunctionProject(workspacePath))) {
23+
if (await isFunctionProject(workspacePath)) {
2424
const files = (await findFiles(context.workspaceFolder, `*/${hostFileName}`));
2525
if (files.length === 0) {
2626
throw new Error(localize('noHostJson', 'No host.json file found in the current workspace.'));

0 commit comments

Comments
 (0)