File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ export default async function getConfig(command, flags) {
8
8
clientSecret : flags . clientSecret || process . env . CLIENT_SECRET ,
9
9
refreshToken : flags . refreshToken || process . env . REFRESH_TOKEN ,
10
10
} ;
11
-
11
+ const isUpload = command === 'upload' || ! command ;
12
12
return {
13
13
apiConfig,
14
- zipPath : await findSource ( flags . source ) ,
15
- isUpload : command === 'upload' || ! command ,
14
+ zipPath : isUpload ? await findSource ( flags . source ) : undefined ,
15
+ isUpload,
16
16
isPublish : command === 'publish' ,
17
17
autoPublish : flags . autoPublish || ! command ,
18
18
trustedTesters : flags . trustedTesters ,
Original file line number Diff line number Diff line change @@ -43,13 +43,15 @@ test('Upload', async t => {
43
43
44
44
t . true ( config . isUpload ) ;
45
45
t . false ( config . isPublish ) ;
46
+ t . truthy ( config . zipPath ) ;
46
47
} ) ;
47
48
48
49
test ( 'Publish' , async t => {
49
50
const config = await createConfig ( 'publish' , { } ) ;
50
51
51
52
t . true ( config . isPublish ) ;
52
53
t . false ( config . isUpload ) ;
54
+ t . is ( config . zipPath , undefined ) ;
53
55
} ) ;
54
56
55
57
test ( 'Auto Publish' , async t => {
@@ -75,4 +77,5 @@ test('Auto upload and publish', async t => {
75
77
t . false ( config . isPublish ) ;
76
78
t . true ( config . isUpload ) ;
77
79
t . true ( config . autoPublish ) ;
80
+ t . truthy ( config . zipPath ) ;
78
81
} ) ;
You can’t perform that action at this time.
0 commit comments