Skip to content

Commit cbd28df

Browse files
authored
Merge pull request #6347 from Shopify/multi-env-store-toml
Fixed store names not parsing correctly in multi-env theme commands
2 parents 83f528f + abff4d4 commit cbd28df

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/theme': patch
3+
---
4+
5+
Fixed issue with theme.toml files that have a store name without the full domain from being parsed in multi-environment mode

packages/theme/src/cli/utilities/theme-command.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {recordEvent, compileData} from '@shopify/cli-kit/node/analytics'
1818
import {addPublicMetadata, addSensitiveMetadata} from '@shopify/cli-kit/node/metadata'
1919
import {cwd, joinPath} from '@shopify/cli-kit/node/path'
2020
import {fileExistsSync} from '@shopify/cli-kit/node/fs'
21+
import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn'
2122
import type {Writable} from 'stream'
2223

2324
export interface FlagValues {
@@ -150,6 +151,11 @@ export default abstract class ThemeCommand extends Command {
150151
silent: true,
151152
})
152153

154+
if (environmentFlags?.store && typeof environmentFlags.store === 'string') {
155+
// eslint-disable-next-line no-await-in-loop
156+
environmentFlags.store = await normalizeStoreFqdn(environmentFlags.store)
157+
}
158+
153159
environmentMap.set(environmentName, {
154160
...flags,
155161
...environmentFlags,

0 commit comments

Comments
 (0)