ihub-cli 1.0.2 → 1.0.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/index.js +5 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -152,15 +152,16 @@ async function getFile(folder,cid,pinata) {
|
|
|
152
152
|
|
|
153
153
|
fs.writeFileSync(`${bpath}`,buffer);
|
|
154
154
|
|
|
155
|
+
const absolutePath = path.resolve(folder);
|
|
155
156
|
|
|
156
|
-
if (fs.existsSync(
|
|
157
|
-
fs.rmSync(
|
|
157
|
+
if (fs.existsSync(absolutePath)){
|
|
158
|
+
fs.rmSync(absolutePath, { recursive: true, force: true });
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
|
|
161
|
-
fs.mkdirSync(
|
|
162
|
+
fs.mkdirSync(absolutePath, { recursive: true });
|
|
162
163
|
|
|
163
|
-
execSync(`git clone ${bpath} ${
|
|
164
|
+
execSync(`git clone ${bpath} ${absolutePath}`, {
|
|
164
165
|
cwd: ".",
|
|
165
166
|
stdio: 'inherit'
|
|
166
167
|
});
|