diff options
author | 2021-04-27 16:13:17 -0500 | |
---|---|---|
committer | 2021-04-27 16:13:17 -0500 | |
commit | ef37cf9c2adb8542226d54fac66a3d3eda315812 (patch) | |
tree | 5ccc781cc5f039c1ac2ea93f251984acdb1f64fb /create-astro/index.js | |
parent | 60d5d13eea88b483f12b4c27f382fa646a942d7f (diff) | |
download | astro-ef37cf9c2adb8542226d54fac66a3d3eda315812.tar.gz astro-ef37cf9c2adb8542226d54fac66a3d3eda315812.tar.zst astro-ef37cf9c2adb8542226d54fac66a3d3eda315812.zip |
fix: catch existing relative paths
Diffstat (limited to 'create-astro/index.js')
-rw-r--r-- | create-astro/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/create-astro/index.js b/create-astro/index.js index cb3823d2e..71d9a86d5 100644 --- a/create-astro/index.js +++ b/create-astro/index.js @@ -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}"`); |