Add qoutes when installing local tgz to fix spacing in the file path

This commit is contained in:
Ahmed Ghorab
2024-11-10 13:30:41 +02:00
parent 604c70ec04
commit 046d56d692
2 changed files with 24 additions and 1 deletions

View File

@@ -144,7 +144,7 @@ async function installModule(module,version,url) {
if (url) {
if (pkgurlRe.test(url) || localtgzRe.test(url)) {
// Git remote url or Tarball url - check the valid package url
installName = url;
installName = localtgzRe.test(url) && slashRe.test(url) ? `"${url}"` : url;
isRegistryPackage = false;
} else {
log.warn(log._("server.install.install-failed-url",{name:module,url:url}));