Skip to content

Commit

Permalink
Merge pull request #1487 from carlossg/preservecontext
Browse files Browse the repository at this point in the history
fix: do not overwrite current context
  • Loading branch information
k8s-ci-robot authored Dec 27, 2023
2 parents 2ff4bb1 + a7d015a commit 426687b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export class KubeConfig {
}

public mergeConfig(config: KubeConfig, preserveContext: boolean = false): void {
if (!preserveContext) {
if (!preserveContext && config.currentContext) {
this.currentContext = config.currentContext;
}
config.clusters.forEach((cluster: Cluster) => {
Expand Down

0 comments on commit 426687b

Please sign in to comment.