0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

fix: catch existing relative paths

This commit is contained in:
Nate Moore 2021-04-27 16:13:17 -05:00
parent 60d5d13eea
commit ef37cf9c2a

View file

@ -17,7 +17,7 @@ export default async function createAstro(argv) {
log();
const dest = resolve(process.cwd(), name);
const relDest = `./${name}`;
const relDest = name.slice(0, 2) === './' ? name : `./${name}`;
if (isEmpty(relDest)) {
await decompress(fs.readFileSync(join(templateRoot, 'starter.tar.gz')), dest);
log(`Your Astro project has been scaffolded at "${relDest}"`);