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

This commit is contained in:
Ahmed Ghorab
2024-07-14 19:37:21 +03:00
parent 29b128e5e0
commit 7df51924b7
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}));