Skip to content

Commit 2ed70dc

Browse files
msivasubramaniaandatho7561
authored andcommitted
combined logic
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
1 parent aaac04e commit 2ed70dc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/serverlessFunction/functions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class Functions {
243243
const yamlContent = await Utils.getFuncYamlContent(context.folderURI.fsPath);
244244
if (yamlContent) {
245245
const deployedNamespace = yamlContent.deploy?.namespace || undefined;
246-
if (!deployedNamespace) {
246+
if (!deployedNamespace || (deployedNamespace === currentNamespace)) {
247247
await this.deployProcess(context, deployedNamespace, yamlContent);
248248
} else if (deployedNamespace !== currentNamespace) {
249249
const response = await window.showInformationMessage(`Function namespace (declared in func.yaml) is different from the current active namespace. Deploy function ${context.name} to current namespace ${currentNamespace}?`,
@@ -252,8 +252,6 @@ export class Functions {
252252
if (response === 'Ok') {
253253
await this.deployProcess(context, currentNamespace, yamlContent);
254254
}
255-
} else {
256-
await this.deployProcess(context, deployedNamespace, yamlContent);
257255
}
258256
}
259257
}

0 commit comments

Comments
 (0)