@aspects-ai/workspace-cli 0.1.2 → 0.1.3
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.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -272,7 +272,10 @@ async function fetchDirectory(options) {
|
|
|
272
272
|
if (!await fs3.pathExists(sourceDir)) {
|
|
273
273
|
throw new Error(`Directory '${options.directory}' not found in repository`);
|
|
274
274
|
}
|
|
275
|
-
await fs3.
|
|
275
|
+
if (await fs3.pathExists(options.targetPath)) {
|
|
276
|
+
await fs3.remove(options.targetPath);
|
|
277
|
+
}
|
|
278
|
+
await fs3.ensureDir(path3.dirname(options.targetPath));
|
|
276
279
|
await fs3.copy(sourceDir, options.targetPath, {
|
|
277
280
|
overwrite: true,
|
|
278
281
|
errorOnExist: false
|