10000 test: Require passing in project name and version from harness (#105) · codean-io/scip-python@281524f · GitHub
[go: up one dir, main page]

Skip to content

Commit 281524f

Browse files
test: Require passing in project name and version from harness (sourcegraph#105)
1 parent f5f0d14 commit 281524f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/pyright-scip/src/MainCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ export function mainCommand(
7474

7575
command
7676
.command('snapshot-dir')
77+
.addHelpText('before', '[Unstable implementation detail, use at your own risk!]')
7778
.argument('<path>', 'the directory containing `input` directories')
7879
.option('--check', 'whether to update or check', false)
7980
.option('--only <name>', 'only generate snapshots for <name>')
80-
.option('--project-name <name>', 'the name of the current project, pypi name if applicable', 'snapshot-util')
81-
.option('--project-version <version>', 'the name of the current project, pypi name if applicable', '0.1')
81+
.requiredOption('--project-name <name>', 'the name of the current project, pypi name if applicable')
82+
.requiredOption('--project-version <version>', 'the name of the current project, pypi name if applicable')
8283
.option('--output <path>', 'path to the output file', DEFAULT_OUTPUT_FILE)
8384
.option('--environment <json-file>', 'the environment json file (experimental)')
8485
.option('--no-index', 'skip indexing (use existing index.scip)')

packages/pyright-scip/test/test-main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ function testMain(mode: 'check' | 'update'): void {
1111
'--environment',
1212
'snapshots/testEnv.json',
1313
'--quiet',
14+
'--project-name',
15+
'snapshot-util',
16+
'--project-version',
17+
'0.1',
1418
];
1519
if (mode === 'check') {
1620
argv.push('--check');

0 commit comments

Comments
 (0)
0