Skip to content

Commit 5ec1b5c

Browse files
committed
Use parseSync
1 parent f0ef4a9 commit 5ec1b5c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/compass-e2e-tests/smoke-test.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { createWriteStream, existsSync, promises as fs } from 'fs';
33
import path from 'path';
44
import yargs from 'yargs';
5-
import type { Argv } from 'yargs';
65
import { hideBin } from 'yargs/helpers';
76
import https from 'https';
87
import { pick } from 'lodash';
@@ -87,17 +86,10 @@ const argv = yargs(hideBin(process.argv))
8786
return true;
8887
});
8988

90-
type BuilderCallbackParsedArgs<A extends (...args: any[]) => Argv<any>> =
91-
ReturnType<ReturnType<A>['parseSync']>;
92-
93-
type SmokeTestsContext = BuilderCallbackParsedArgs<typeof argv>;
89+
type SmokeTestsContext = ReturnType<typeof argv['parseSync']>;
9490

9591
async function run() {
96-
const parsedArgs = argv.parse();
97-
98-
if ('then' in parsedArgs && typeof parsedArgs.then === 'function') {
99-
throw new Error('Async args parser is not allowed');
100-
}
92+
const parsedArgs = argv.parseSync();
10193

10294
const context = parsedArgs as SmokeTestsContext;
10395

0 commit comments

Comments
 (0)