From 89dc1ce5723744349a468d263fcdee1f517236b1 Mon Sep 17 00:00:00 2001 From: Vladislav Ryzhov <79705997+vladislav-ryzhov@users.noreply.github.com> Date: Thu, 20 May 2021 08:20:41 +0300 Subject: [PATCH] [DownloadBuildArtifactsV0] Normalize download path (#14849) * Added path.normalize for normalizing slashes in path * Updated task.loc.json * Added another variable for normalized path * Normalize the download path as soon as it is received from the input Co-authored-by: Vladislav Ryzhov Co-authored-by: DaniilShmelev <72494759+DaniilShmelev@users.noreply.github.com> --- Tasks/DownloadBuildArtifactsV0/main.ts | 2 +- Tasks/DownloadBuildArtifactsV0/task.json | 4 ++-- Tasks/DownloadBuildArtifactsV0/task.loc.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tasks/DownloadBuildArtifactsV0/main.ts b/Tasks/DownloadBuildArtifactsV0/main.ts index ceb82b9ff53b..5fb2c96448f1 100644 --- a/Tasks/DownloadBuildArtifactsV0/main.ts +++ b/Tasks/DownloadBuildArtifactsV0/main.ts @@ -79,7 +79,7 @@ async function main(): Promise { var buildVersionToDownload: string = tl.getInput("buildVersionToDownload", false); var allowPartiallySucceededBuilds: boolean = tl.getBoolInput("allowPartiallySucceededBuilds", false); var branchName: string = tl.getInput("branchName", false); - var downloadPath: string = tl.getInput("downloadPath", true); + var downloadPath: string = path.normalize(tl.getInput("downloadPath", true)); var downloadType: string = tl.getInput("downloadType", true); var tagFiltersInput: string = tl.getInput("tags", false); var tagFilters = []; diff --git a/Tasks/DownloadBuildArtifactsV0/task.json b/Tasks/DownloadBuildArtifactsV0/task.json index fa49bb7030cd..c7d5c690613a 100644 --- a/Tasks/DownloadBuildArtifactsV0/task.json +++ b/Tasks/DownloadBuildArtifactsV0/task.json @@ -9,8 +9,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 186, - "Patch": 3 + "Minor": 188, + "Patch": 0 }, "groups": [ { diff --git a/Tasks/DownloadBuildArtifactsV0/task.loc.json b/Tasks/DownloadBuildArtifactsV0/task.loc.json index c74af05eb5eb..5ad7ffaa257f 100644 --- a/Tasks/DownloadBuildArtifactsV0/task.loc.json +++ b/Tasks/DownloadBuildArtifactsV0/task.loc.json @@ -9,8 +9,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 186, - "Patch": 3 + "Minor": 188, + "Patch": 0 }, "groups": [ {