c12 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -286,12 +286,13 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
286
286
|
} else {
|
|
287
287
|
cloneDir = process.env.XDG_CACHE_HOME ? pathe.resolve(process.env.XDG_CACHE_HOME, "c12", cloneName) : pathe.resolve(node_os.homedir(), ".cache/c12", cloneName);
|
|
288
288
|
}
|
|
289
|
-
if (node_fs.existsSync(cloneDir)) {
|
|
289
|
+
if (node_fs.existsSync(cloneDir) && !sourceOptions.install) {
|
|
290
290
|
await promises.rm(cloneDir, { recursive: true });
|
|
291
291
|
}
|
|
292
292
|
const cloned = await downloadTemplate(source, {
|
|
293
293
|
dir: cloneDir,
|
|
294
294
|
install: sourceOptions.install,
|
|
295
|
+
force: sourceOptions.install,
|
|
295
296
|
...options.giget,
|
|
296
297
|
...sourceOptions.giget
|
|
297
298
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -266,12 +266,13 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
266
266
|
} else {
|
|
267
267
|
cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, "c12", cloneName) : resolve(homedir(), ".cache/c12", cloneName);
|
|
268
268
|
}
|
|
269
|
-
if (existsSync(cloneDir)) {
|
|
269
|
+
if (existsSync(cloneDir) && !sourceOptions.install) {
|
|
270
270
|
await rm(cloneDir, { recursive: true });
|
|
271
271
|
}
|
|
272
272
|
const cloned = await downloadTemplate(source, {
|
|
273
273
|
dir: cloneDir,
|
|
274
274
|
install: sourceOptions.install,
|
|
275
|
+
force: sourceOptions.install,
|
|
275
276
|
...options.giget,
|
|
276
277
|
...sourceOptions.giget
|
|
277
278
|
});
|