From 9dec0f90d9b2a7f1c00aa09f5fb1b0c12e973f85 Mon Sep 17 00:00:00 2001 From: Maxwell Weru Date: Thu, 17 Dec 2020 12:23:54 +0300 Subject: [PATCH] Encode special characters like spaces for project and repository in the extension task --- src/extension/task/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/extension/task/index.ts b/src/extension/task/index.ts index 1b16edcb..9e07eae7 100644 --- a/src/extension/task/index.ts +++ b/src/extension/task/index.ts @@ -78,10 +78,12 @@ async function run() { // Set the project let project: string = tl.getVariable('System.TeamProject'); + project = encodeURI(project); // encode special characters like spaces dockerRunner.arg(['-e', `PROJECT=${project}`]); // Set the repository let repository: string = tl.getVariable('Build.Repository.Name'); + repository = encodeURI(repository); // encode special characters like spaces dockerRunner.arg(['-e', `REPOSITORY=${repository}`]); // Set the package manager