MCPcopy Create free account
hub / github.com/Azure/powershell / constructor

Method constructor

src/AzModuleInstaller.ts:32–47  ·  view source on GitHub ↗
(version: string, githubAuth?: string)

Source from the content-addressed store, hash-verified

30 private isWin = false;
31
32 public constructor(version: string, githubAuth?: string) {
33 this.version = version;
34 this.githubAuth = githubAuth;
35 this.installResult = {
36 moduleSource: "Others",
37 isInstalled: false
38 };
39 const platform = (process.env.RUNNER_OS || os.type())?.toLowerCase();
40 core.debug(`Platform: ${platform}`);
41 this.moduleRoot = Utils.getDefaultAzInstallFolder(platform);
42 if(platform == "windows" || platform == "windows_nt"){
43 this.isWin = true;
44 }
45 this.modulePath = path.join(this.moduleRoot, `${Constants.prefix}${this.version}`);
46 this.moduleZipPath = `${this.modulePath}.zip`;
47 }
48
49 public async install(): Promise<InstallResult> {
50 if (Utils.isHostedAgent(this.moduleRoot)) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected