Skip to content

Commit e538b36

Browse files
author
Niranjan Jayakar
authored
fix(rosetta): hangs on 'markdown' command when a file is provided (#2871)
This is caused due to a mismatch between the command declaration where the argument is named 'FILE' and the positional declaration where the parameter is named 'file'. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent b7851a1 commit e538b36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/jsii-rosetta/bin/jsii-rosetta.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function main() {
3030
'Translate a single snippet',
3131
(command) =>
3232
command
33-
.positional('file', {
33+
.positional('FILE', {
3434
type: 'string',
3535
describe: 'The file to translate (leave out for stdin)',
3636
})
@@ -41,7 +41,7 @@ function main() {
4141
}),
4242
wrapHandler(async (args) => {
4343
const result = translateTypeScript(
44-
await makeFileSource(args.file ?? '-', 'stdin.ts'),
44+
await makeFileSource(args.FILE ?? '-', 'stdin.ts'),
4545
makeVisitor(args),
4646
);
4747
renderResult(result);
@@ -52,7 +52,7 @@ function main() {
5252
'Translate a MarkDown file',
5353
(command) =>
5454
command
55-
.positional('file', {
55+
.positional('FILE', {
5656
type: 'string',
5757
describe: 'The file to translate (leave out for stdin)',
5858
})
@@ -63,7 +63,7 @@ function main() {
6363
}),
6464
wrapHandler(async (args) => {
6565
const result = translateMarkdown(
66-
await makeFileSource(args.file ?? '-', 'stdin.md'),
66+
await makeFileSource(args.FILE ?? '-', 'stdin.md'),
6767
makeVisitor(args),
6868
);
6969
renderResult(result);

0 commit comments

Comments
 (0)