File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/theme/src/cli/utilities Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import {loadEnvironment} from '@shopify/cli-kit/node/environments'
77import { renderConcurrent , renderConfirmationPrompt , renderError } from '@shopify/cli-kit/node/ui'
88import { fileExistsSync } from '@shopify/cli-kit/node/fs'
99import { AbortError } from '@shopify/cli-kit/node/error'
10+ import { resolvePath } from '@shopify/cli-kit/node/path'
1011import type { Writable } from 'stream'
1112
1213vi . mock ( '@shopify/cli-kit/node/session' )
@@ -572,13 +573,13 @@ describe('ThemeCommand', () => {
572573 expect ( commandCalls ) . toHaveLength ( 3 )
573574
574575 const themeEnvFlags = commandCalls [ 0 ] ?. flags
575- expect ( themeEnvFlags ?. path ) . toEqual ( 'theme/path' )
576+ expect ( themeEnvFlags ?. path ) . toEqual ( resolvePath ( 'theme/path' ) )
576577 expect ( themeEnvFlags ?. store ) . toEqual ( 'store1.myshopify.com' )
577578 expect ( themeEnvFlags ?. theme ) . toEqual ( 'theme1.myshopify.com' )
578579 expect ( themeEnvFlags ?. [ 'no-color' ] ) . toEqual ( true )
579580
580581 const developmentEnvFlags = commandCalls [ 1 ] ?. flags
581- expect ( developmentEnvFlags ?. path ) . toEqual ( 'development/path' )
582+ expect ( developmentEnvFlags ?. path ) . toEqual ( resolvePath ( 'development/path' ) )
582583 expect ( developmentEnvFlags ?. store ) . toEqual ( 'store2.myshopify.com' )
583584 expect ( developmentEnvFlags ?. development ) . toEqual ( true )
584585 expect ( developmentEnvFlags ?. [ 'no-color' ] ) . toEqual ( true )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {AbortController} from '@shopify/cli-kit/node/abort'
1717import { AbortError } from '@shopify/cli-kit/node/error'
1818import { recordEvent , compileData } from '@shopify/cli-kit/node/analytics'
1919import { addPublicMetadata , addSensitiveMetadata } from '@shopify/cli-kit/node/metadata'
20- import { cwd , joinPath } from '@shopify/cli-kit/node/path'
20+ import { cwd , joinPath , resolvePath } from '@shopify/cli-kit/node/path'
2121import { fileExistsSync } from '@shopify/cli-kit/node/fs'
2222import { normalizeStoreFqdn } from '@shopify/cli-kit/node/context/fqdn'
2323import type { Writable } from 'stream'
@@ -161,6 +161,10 @@ export default abstract class ThemeCommand extends Command {
161161 environmentFlags . store = await normalizeStoreFqdn ( environmentFlags . store )
162162 }
163163
164+ if ( environmentFlags ?. path && typeof environmentFlags . path === 'string' ) {
165+ environmentFlags . path = resolvePath ( environmentFlags . path )
166+ }
167+
164168 environmentMap . set ( environmentName , {
165169 ...flags ,
166170 ...environmentFlags ,
You can’t perform that action at this time.
0 commit comments