fix issue for undefined sessions in theme commands#6828
Open
EvilGenius13 wants to merge 1 commit intomainfrom
Open
fix issue for undefined sessions in theme commands#6828EvilGenius13 wants to merge 1 commit intomainfrom
EvilGenius13 wants to merge 1 commit intomainfrom
Conversation
Contributor
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3718 tests passing in 1438 suites. Report generated by 🧪jest coverage report action from 5e925f9 |
aswamy
approved these changes
Feb 5, 2026
Contributor
There was a problem hiding this comment.
Amazing stuff! 🥇
Tophatted and everything looks great.
✅ Run commands with email/password
✅ Run commands with default environment
✅ Run commands with -e flag
✅ Run commands with multiple -e flags
Question: theme check doesn't need you to be logged in - but does take environment as a flag? What kind of configuration can you have when you pass in an env?
Contributor
Author
It lets you set a path to the theme folder you want to check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Fixes https://github.com/Shopify/developer-tools-team/issues/1024?reload=1
Follow up from the PR to fix default environments
CLI main is failing on commands that don't need a store flag to run such as
theme profile. A few other commands are failing with an errorCannot read properties of undefinedsuch astheme initWHAT is this pull request doing?
Two parter:
static multiEnvironmentsFlags: RequiredFlags = nullwhich is our way of telling whether these commands support multi env or not. I have added them where needed.How to test your changes?
Unfortunately we need to test this in a few configurations to make sure we caught every instance.
Run the commands using regular auth (email / password) login
shopify theme devShould passshopify theme listShould passshopify theme packageShould passshopify theme checkShould passshopify theme profileShould passRun the commands using a default environment (
[environments.default]) in yourshopify.theme.tomlNote: Using the default environment means you do not need to explicitly pass it as an environment.shopify theme devShould passshopify theme listShould passshopify theme packageShould passshopify theme checkShould passshopify theme profileShould fail (can only run using regular auth)Run the commands using an environment variable (-e my_store) from your
shopify.theme.tomlshopify theme devShould passshopify theme listShould passshopify theme packageShould fail (packagedoesn't have an environment flag)shopify theme checkShould passshopify theme profileShould fail (can only run using regular auth)Run the commands using two environment variables (-e my_store, -e my_other_store ) from your
shopify.theme.tomlshopify theme devShould fail (can't run in multi env mode)shopify theme listShould passI shortened this one since only a few commands run in multi env mode
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist