Encode project name in download commands

This allows to use download commands in case project name
contains any special characters i.e. spaces

Bug: Issue 10021
Change-Id: Iac4288559662b0a9beda3d33a06ef2e8c54bc338
Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
(cherry picked from commit 8a88d06df1)
This commit is contained in:
Eryk Szymanski 2018-11-14 15:07:32 -08:00 committed by David Pursehouse
parent c060c01d15
commit b85679f8dc

View File

@ -307,9 +307,9 @@
commands.push({
title,
command: commandObj[title]
.replace('${project}', repo)
.replace('${project}', encodeURI(repo))
.replace('${project-base-name}',
repo.substring(repo.lastIndexOf('/') + 1)),
encodeURI(repo.substring(repo.lastIndexOf('/') + 1))),
});
}
return commands;