Skip to content

Commit bb48fcb

Browse files
committed
Use Command.setActiveProject function instead of new CommandText()
Signed-off-by: Denis Golovin [email protected]
1 parent 917f034 commit bb48fcb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/openshift/project.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import OpenShiftItem, { clusterRequired } from './openshiftItem';
88
import { OpenShiftObject, OpenShiftProject, getInstance as getOdoInstance } from '../odo';
99
import { Progress } from '../util/progress';
1010
import { vsCommand, VsCommandError } from '../vscommand';
11-
import { CommandText } from '../odo/command';
11+
import { Command, CommandText } from '../odo/command';
1212

1313
export class Project extends OpenShiftItem {
1414

1515
@vsCommand('openshift.project.set', true)
1616
@clusterRequired()
1717
static async set(): Promise<string | null> {
18-
let message = null;
18+
let message: string = null;
1919
const createNewProject = {
2020
label: 'Create new Project',
2121
description: 'Create new Project and make it active'
@@ -31,7 +31,7 @@ export class Project extends OpenShiftItem {
3131
await commands.executeCommand('openshift.project.create');
3232
} else {
3333
const project = selectedItem as OpenShiftObject;
34-
await Project.odo.execute(new CommandText('odo project set', project.getName()));
34+
await Project.odo.execute(Command.setActiveProject(project.getName()));
3535
Project.explorer.refresh();
3636
message = `Project '${project.getName()}' set as active.`;
3737
}

0 commit comments

Comments
 (0)