mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
committed by
Alan Ren
parent
3b1c9e910d
commit
af9984f73b
@@ -13,7 +13,6 @@ import { ToolBase } from './toolBase';
|
||||
import { DeploymentConfigurationKey, AzdataPipInstallUriKey, azdataPipInstallArgsKey } from '../../constants';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
const installationRoot = '~/.local/bin';
|
||||
|
||||
export class AzdataTool extends ToolBase {
|
||||
constructor(platformService: IPlatformService) {
|
||||
@@ -46,6 +45,12 @@ export class AzdataTool extends ToolBase {
|
||||
};
|
||||
}
|
||||
|
||||
protected get discoveryCommand(): Command {
|
||||
return {
|
||||
command: this.discoveryCommandString('azdata')
|
||||
};
|
||||
}
|
||||
|
||||
protected getVersionFromOutput(output: string): SemVer | undefined {
|
||||
let version: SemVer | undefined = undefined;
|
||||
if (output && output.split(EOL).length > 0) {
|
||||
@@ -58,13 +63,15 @@ export class AzdataTool extends ToolBase {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected async getInstallationPath(): Promise<string | undefined> {
|
||||
protected async getSearchPaths(): Promise<string[]> {
|
||||
switch (this.osType) {
|
||||
case OsType.linux:
|
||||
return installationRoot;
|
||||
default:
|
||||
const azdataCliInstallLocation = await this.getPip3InstallLocation('azdata-cli');
|
||||
return azdataCliInstallLocation && path.join(azdataCliInstallLocation, '..', 'Scripts');
|
||||
if (azdataCliInstallLocation) {
|
||||
return [path.join(azdataCliInstallLocation, '..', 'Scripts'), path.join(azdataCliInstallLocation, '..', '..', '..', 'bin')];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,11 +85,7 @@ export class AzdataTool extends ToolBase {
|
||||
}
|
||||
|
||||
protected get uninstallCommand(): string | undefined {
|
||||
if (this.osType !== OsType.linux) {
|
||||
return this.defaultUninstallCommand;
|
||||
} else {
|
||||
return super.uninstallCommand;
|
||||
}
|
||||
return this.defaultUninstallCommand;
|
||||
}
|
||||
|
||||
private get defaultInstallationCommands(): Command[] {
|
||||
|
||||
Reference in New Issue
Block a user