themekit icon indicating copy to clipboard operation
themekit copied to clipboard

Running `theme get` populates current directory instead of creating a new sub-directory

Open milne-dev opened this issue 5 years ago • 1 comments

Describe the bug Running theme get populates your current working directory instead of creating a new sub-directory to populate.

To Reproduce

  1. run command theme get -p=PWD -s=STORE.myshopify.com -t=THEMEID
  2. all your theme files are now in your current working directory

Expected behavior A new sub-directory should be created and populated with files.

Environment

  • OS: Linux 5.9.14-arch1-1
  • Themekit version: 1.1.4 linux/amd64
  • Editor: Goland

Additional context Current *nix command line tools use this ubiquitous behavior; git clone [email protected]:Shopify/themekit.git will not spew the project into your current working directory, but nicely creates a sub-directory to populate. The same behavior can be found using the the longstanding zip command unzip themekit-master.zip.

I am willing to contribute a PR for this once feedback is provided.

milne-dev avatar Dec 18 '20 23:12 milne-dev

Hey man!

I'm having a similar issue here. I think you can use the --dir property in the CLI, like this:

  • theme get --dir="/path/to/my/folder" -p=PWD -s=STORE.myshopify.com -t=THEMEID

The only sad thing is that you'll have to create the folder before calling this command.

Something like:

mkdir /blah
theme get --dir="/blah" -p=PWD -s=STORE.myshopify.com -t=THEMEID

Hope it helps you.

thiguet avatar Nov 16 '21 23:11 thiguet