Shopify theme check fails with default environment set in shopify.theme.toml

I have reproduced the issue on the latest CLI version.

Yes, I am on the latest version

I have searched existing posts and this report is not a duplicate.

Yes, this isnโ€™t a duplicate

In which of these areas are you experiencing a problem?

Theme

Expected behavior

shopify theme check runs without an error

Actual behavior

Shopify theme check results in the following error: Please provide a valid environment.

Reproduction steps

Ensure you have the latest @shopify/cli: npm i -g @shopify/cli@latest (3.89.0 as of now)
Clone latest dawn theme: GitHub - Shopify/dawn: Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Run shopify theme check (note there should be no errors).
Add a shopify.theme.toml to the top level, then add

[environments.default]
store = "xyz.myshopify.com"

In the terminal, run shopify theme check again. Note the error: โ€œPlease provide a valid environment.โ€

Note this did not occur prior to v3.89.0.

Verbose output

shopify theme check --verbose
2026-01-21T18:41:54.814Z: Running command theme check
2026-01-21T18:41:54.816Z: Running system process in background:
  ยท Command: /Users/xyz/.nvm/versions/node/v24.12.0/bin/node /Users/xyz/.nvm/versions/node/v24.12.0/bin/shopify notifications list --ignore-errors
  ยท Working directory: /Users/xyz/Documents/dev-adhoc/dawn

2026-01-21T18:41:54.820Z: Notifications to show: 0
2026-01-21T18:41:54.823Z: Reading the content of file at shopify.theme.toml...
โ•ญโ”€ error โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                              โ”‚
โ”‚  Please provide a valid environment.                                         โ”‚
โ”‚                                                                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

2026-01-21T18:41:54.845Z: Running system process:
  ยท Command: npm prefix
  ยท Working directory: /Users/xyz/Documents/dev-adhoc/dawn

2026-01-21T18:41:54.970Z: Obtaining the dependency manager in directory /Users/xyz/Documents/dev-adhoc/dawn...
2026-01-21T18:41:55.091Z: Getting current session ID...
2026-01-21T18:41:55.092Z: Getting current session ID...
2026-01-21T18:41:58.796Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 3696 ms
With response headers:
 - x-request-id: e875117e-20f5-42a6-92d5-045521461b60
    
2026-01-21T18:41:58.798Z: Analytics event sent: {
  "command": "theme check",
  "time_start": 1769020914815,
  "time_end": 1769020914843,
  "total_time": 28,
  "success": false,
  "cli_version": "3.89.0",
  "ruby_version": "",
  "node_version": "24.12.0",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "zsh",
  "env_device_id": "e6a1790d8b3381200d0ddee5503d04027dea4d8b",
  "env_cloud": "localhost",
  "env_package_manager": "unknown",
  "env_is_global": true,
  "env_auth_method": "device_auth",
  "env_is_wsl": false,
  "env_build_repository": "Shopify/cli",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_all_timing_network_ms": 0,
  "cmd_all_timing_prompts_ms": 0,
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "theme",
  "cmd_all_plugin": "@shopify/theme",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "8688f8f845de2227c48abe678e176750c75fb892",
  "cmd_all_timing_active_ms": 28,
  "cmd_all_exit": "expected_error",
  "user_id": "3265f6d0-84fa-487b-b542-c043f69c55be",
  "request_ids": [],
  "args": "--verbose",
  "cmd_all_environment_flags": "{\"store\":\"xyz.myshopify.com\"}",
  "error_message": "Please provide a valid environment.",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "env_shopify_variables": "{}",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2026-01-21T18:41:58.832Z: Getting current session ID...
2026-01-21T18:41:58.833Z: Reporting handled error to Bugsnag: Please provide a valid environment.
2026-01-21T18:41:59.096Z: Running system process:
  ยท Command: npm prefix
  ยท Working directory: /Users/xyz/Documents/dev-adhoc/dawn

2026-01-21T18:41:59.214Z: Obtaining the dependency manager in directory /Users/xyz/Documents/dev-adhoc/dawn...
2026-01-21T18:41:59.214Z: Getting current session ID...

Operating system

Mac OS Tahoe

CLI version

3.89.0

Shell

zsh

Nodejs version

v24.12.0

What language and version are you using in your application?

node v24.12.0

We have the same problem.
"shopify theme checkโ€ works directly, but not when invoked via a shell script.

$ shopify theme check
โ•ญโ”€ info โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                      โ”‚
โ”‚  Using applicable flags from default environment:                                                    โ”‚
โ”‚                                                                                                      โ”‚
โ”‚    โ€ข auto-correct: true                                                                              โ”‚
โ”‚    โ€ข fail-level: warning                                                                             โ”‚
โ”‚                                                                                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ•ญโ”€ success โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                      โ”‚
โ”‚  [default] Theme Check Summary.                                                                      โ”‚
โ”‚                                                                                                      โ”‚
โ”‚  341 files inspected with no offenses found.                                                         โ”‚
โ”‚                                                                                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

$ ./bin/check
โ•ญโ”€ info โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                      โ”‚
โ”‚  Using applicable flags from default environment:                                                    โ”‚
โ”‚                                                                                                      โ”‚
โ”‚    โ€ข auto-correct: true                                                                              โ”‚
โ”‚    โ€ข fail-level: warning                                                                             โ”‚
โ”‚                                                                                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ•ญโ”€ error โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                      โ”‚
โ”‚  Please provide a valid environment.                                                                 โ”‚
โ”‚                                                                                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

$ cat ./bin/check
#!/usr/bin/env bash
shopify theme check

1 Like

Thanks folks, weโ€™ll have a look at this.

1 Like

:wave: Hey folks,

Thank you for reporting this!

Weโ€™ve prepared a fix for the issue here:

This fix will be included in the next release. In the meantime, Iโ€™ve also generated a snapshot so you can access the fix earlier:

Thanks again for flagging this!

2 Likes