Remove useless path.join

This commit is contained in:
Rémi de Juvigny 2021-11-04 14:01:02 +01:00
parent ca729a8f68
commit 1e371f6942

View File

@ -52,7 +52,7 @@ async function downloadNpmTemplate({ name, version }, parentDir) {
// Return the path of the actual template
const exactTemplatePath = path.dirname(
require.resolve(path.join(name, 'package.json'), { paths: [parentDir] })
require.resolve(`${name}/package.json`, { paths: [parentDir] })
);
return exactTemplatePath;
}