Skip to content

Commit

Permalink
use local install path for unzip dependency check installer
Browse files Browse the repository at this point in the history
  • Loading branch information
pippolino committed Apr 10, 2024
1 parent 7caadf3 commit 41fb855
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions Tasks/DependencyCheck/dependency-check-build-task.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import tl = require('azure-pipelines-task-lib/task');
import httpClient = require('typed-rest-client/HttpClient');
import fs = require('fs');
import url = require('url');
import path = require('path');
import decompress from 'decompress';
import { IHttpClientResponse } from 'typed-rest-client/Interfaces';
Expand Down Expand Up @@ -139,7 +138,7 @@ async function run() {
}

cleanLocalInstallPath(localInstallPath);
await unzipFromUrl(zipUrl, __dirname);
await unzipFromUrl(zipUrl, path.join(localInstallPath, '../'));
}

// Pull cached data archive
Expand Down Expand Up @@ -319,7 +318,7 @@ function maskArguments(args: string): string {
}

async function unzipFromUrl(zipUrl: string, unzipLocation: string): Promise<void> {
const fileName = path.basename(url.parse(zipUrl).pathname);
const fileName = path.basename(new URL(zipUrl).pathname);
const zipLocation = tl.resolve(fileName)
let tmpError = null;
let response: IHttpClientResponse = null;
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"semver": "^7.5.4",
"shelljs": "^0.8.5",
"terser-webpack-plugin": "^5.3.10",
"tfx-cli": "^0.16.0",
"tfx-cli": "^0.17.0",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.4",
Expand All @@ -58,7 +58,7 @@
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0",
"yargs": "^17.7.2",
"mocha": "^10.2.0",
"mocha": "^10.4.0",
"assert": "^2.1.0"
}
}

0 comments on commit 41fb855

Please sign in to comment.