Skip to content

Commit

Permalink
fix: init theme extraction issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Mar 25, 2021
1 parent 7c0a23b commit 00a6388
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [2.0.6](https://github.com/hayes0724/shopify-packer/compare/2.0.5...2.0.6) (2021-03-25)


### :bug: Bug Fixes

* init theme extraction issue ([0dae9b9](https://github.com/hayes0724/shopify-packer/commit/0dae9b9e782c94d971a1dcc9f4d99345b5a8f774))



## [2.0.5](https://github.com/hayes0724/shopify-packer/compare/2.0.4...2.0.5) (2021-03-25)


Expand Down
12 changes: 3 additions & 9 deletions cli/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,11 @@ module.exports = (args) => {
spinner.text = 'Starting download...';
fs.ensureDir(dir)
.then(() => download(release, dir, {filename: 'temp.zip'}))
.then(async () => {
spinner.text = 'Extracting the files from archive...';
try {
await extract(tempfile, {dir});
} catch (e) {
console.error(e);
}
})
.then(() => extract(tempfile, {dir: dir}))
.then(() => fs.copy(extracted, dir))
.then(() => fs.remove(tempfile))
.then(() => fs.remove(extracted))
.then(() => {
fs.remove(extracted);
spinner.succeed('Theme initialized!');
})
.catch((e) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hayes0724/shopify-packer",
"version": "2.0.5",
"version": "2.0.6",
"bin": {
"packer": "cli/index.js"
},
Expand Down

0 comments on commit 00a6388

Please sign in to comment.