archetype-themes / plugin-theme-component

A Shopify CLI plugin for building theme components.
MIT License
9 stars 4 forks source link

CLI: Bug - Source Dev Theme Folder or Repository is invalid #310

Closed bertiful closed 6 months ago

bertiful commented 9 months ago
  1. Create a new branch in the local Expanse repo (in my case remove-country-flags)
  2. In the components repo, update the TOML file to include a relative path: dev-theme = "../expanse"
  3. Run shopify theme component dev (this works)
  4. Close the process and run shopify theme component dev again

You should get the following error:

ERROR: Source Dev Theme Folder or Repository is invalid: Command failed: git pull --quiet
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> remove-country-flags

Only fix right now is to delete the .explorer folder before running shopify theme component dev a second time.

bertiful commented 9 months ago

Took a couple minutes to debug and landed on this as the culprit:

https://github.com/archetype-themes/plugin-theme-component/blob/ce1eaab5c65a39905ab03f6ea277332efcfd6aa3/src/utils/ExternalComponentUtils.js#L17-L20

Do we really need to git restore and pull for a local path? We could instead manually git pull within the path itself, if need be.

fleveillee commented 8 months ago

A lot of changes are in progress for this feature at the moment. Initially, this was supposed to use remote repos only. This somehow changed along the way, but someone didn't check if that affected the rest of the code. This should be resolved in the next release, hopefully early next week.

fleveillee commented 6 months ago

@bertiful—The git pull command was entirely removed. Now that issue #386 has been released, this should be resolved. Can you please check again? If it is not a problem anymore, please close the issue.

bertiful commented 6 months ago

Can confirm this is no longer an issue 👍🏻