diff --git a/src/features/contentCreator/createDevfilePage.ts b/src/features/contentCreator/createDevfilePage.ts index ec9b6d681..074f29c02 100644 --- a/src/features/contentCreator/createDevfilePage.ts +++ b/src/features/contentCreator/createDevfilePage.ts @@ -88,6 +88,12 @@ export class CreateDevfile { const nonce = getNonce(); const workspaceDir = this.getWorkspaceFolder(); + let projectName = ""; + + if (workspaceDir !== "") { + const projectNameSplit = workspaceDir.split("/"); + projectName = projectNameSplit[projectNameSplit.length - 1]; + } const webviewUri = getUri(webview, extensionUri, [ "out", @@ -132,7 +138,7 @@ export class CreateDevfile {