pass install paths to notebooks (#8008)

* pass install paths to notebooks

* onComplete

* discover and publish actual installation Path

* pass the path to notebook

* minor fixes needed post merge of code from remote

* fix some errors

* remove unused variable
This commit is contained in:
Arvind Ranasaria
2019-10-25 12:06:55 -07:00
committed by Karl Burtram
parent fd7b5a8628
commit beab3cb48c
15 changed files with 195 additions and 44 deletions

View File

@@ -11,6 +11,8 @@ import { ToolBase } from './toolBase';
const localize = nls.loadMessageBundle();
const defaultInstallationRoot = '/usr/local/bin';
export class KubeCtlTool extends ToolBase {
constructor(platformService: IPlatformService) {
super(platformService);
@@ -49,10 +51,24 @@ export class KubeCtlTool extends ToolBase {
return { command: 'kubectl version -o json --client' };
}
protected get discoveryCommand(): Command {
return {
command: this.discoveryCommandString('kubectl')
};
}
get autoInstallSupported(): boolean {
return true;
}
protected async getSearchPaths(): Promise<string[]> {
switch (this.osType) {
case OsType.win32:
return [this.storagePath];
default:
return [defaultInstallationRoot];
}
}
protected readonly allInstallationCommands: Map<OsType, Command[]> = new Map<OsType, Command[]>([
[OsType.linux, linuxInstallationCommands],
[OsType.win32, win32InstallationCommands],