Skip to content

Commit 6c3ac35

Browse files
authored
Don't look for local extension with plain publish command (#88)
1 parent 8d53b9e commit 6c3ac35

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export default async function getConfig(command, flags) {
88
clientSecret: flags.clientSecret || process.env.CLIENT_SECRET,
99
refreshToken: flags.refreshToken || process.env.REFRESH_TOKEN,
1010
};
11-
11+
const isUpload = command === 'upload' || !command;
1212
return {
1313
apiConfig,
14-
zipPath: await findSource(flags.source),
15-
isUpload: command === 'upload' || !command,
14+
zipPath: isUpload ? await findSource(flags.source) : undefined,
15+
isUpload,
1616
isPublish: command === 'publish',
1717
autoPublish: flags.autoPublish || !command,
1818
trustedTesters: flags.trustedTesters,

test/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ test('Upload', async t => {
4343

4444
t.true(config.isUpload);
4545
t.false(config.isPublish);
46+
t.truthy(config.zipPath);
4647
});
4748

4849
test('Publish', async t => {
4950
const config = await createConfig('publish', {});
5051

5152
t.true(config.isPublish);
5253
t.false(config.isUpload);
54+
t.is(config.zipPath, undefined);
5355
});
5456

5557
test('Auto Publish', async t => {
@@ -75,4 +77,5 @@ test('Auto upload and publish', async t => {
7577
t.false(config.isPublish);
7678
t.true(config.isUpload);
7779
t.true(config.autoPublish);
80+
t.truthy(config.zipPath);
7881
});

0 commit comments

Comments
 (0)