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.
Files changed (2) hide show
  1. package/index.js +5 -4
  2. 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(folder)){
157
- fs.rmSync(folder, { recursive: true, force: true });
157
+ if (fs.existsSync(absolutePath)){
158
+ fs.rmSync(absolutePath, { recursive: true, force: true });
158
159
  }
159
160
 
160
161
 
161
- fs.mkdirSync(folder, { recursive: true });
162
+ fs.mkdirSync(absolutePath, { recursive: true });
162
163
 
163
- execSync(`git clone ${bpath} ${folder}`, {
164
+ execSync(`git clone ${bpath} ${absolutePath}`, {
164
165
  cwd: ".",
165
166
  stdio: 'inherit'
166
167
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ihub-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "immutablehub cli to push and clone repos",
5
5
  "main": "index.js",
6
6
  "type": "module",