File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @shopify/theme ' : patch
3
+ ---
4
+
5
+ Provide error when using non-theme access app password
Original file line number Diff line number Diff line change 1
1
import { Flags } from '@oclif/core'
2
2
import { normalizeStoreFqdn } from '@shopify/cli-kit/node/context/fqdn'
3
+ import { AbortError } from '@shopify/cli-kit/node/error'
3
4
import { resolvePath , cwd } from '@shopify/cli-kit/node/path'
4
5
5
6
/**
@@ -17,6 +18,13 @@ export const themeFlags = {
17
18
password : Flags . string ( {
18
19
description : 'Password generated from the Theme Access app.' ,
19
20
env : 'SHOPIFY_CLI_THEME_TOKEN' ,
21
+ parse : async ( input ) => {
22
+ if ( input . startsWith ( 'shptka_' ) ) {
23
+ return input
24
+ }
25
+
26
+ throw new AbortError ( 'Invalid password. Please generate a new password from the Theme Access app.' )
27
+ } ,
20
28
} ) ,
21
29
store : Flags . string ( {
22
30
char : 's' ,
You can’t perform that action at this time.
0 commit comments