Running `theme get` populates current directory instead of creating a new sub-directory
Describe the bug
Running theme get populates your current working directory instead of creating a new sub-directory to populate.
To Reproduce
- run command
theme get -p=PWD -s=STORE.myshopify.com -t=THEMEID - 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.
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.