Skip to content

Commit 3d49d6f

Browse files
authored
feat(jsii-pacmak): parsing arguments in non-strict mode (#4068)
Some targets support extra target-specific arguments so users can customize the behavior of the build tools. For example, the Java target allows users to customize the `mvn` CLI behaviour with `--mvn-*` parameters. However the `jsi-pacmak` CLI is blocking this feature because it is using strict mode when parsing arguments. This change lifts that gate. This address [#3465](#3465) --- 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 2cb15f8 commit 3d49d6f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/jsii-pacmak/bin/jsii-pacmak.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ import { VERSION_DESC } from '../lib/version';
165165
desc: 'Whether jsii assemblies should be validated. This can be expensive and is skipped by default.',
166166
default: false,
167167
})
168-
.version(VERSION_DESC)
169-
.strict().argv;
168+
.version(VERSION_DESC).argv;
170169

171170
configureLogging({ level: argv.verbose !== undefined ? argv.verbose : 0 });
172171

packages/jsii-pacmak/test/build-test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,9 @@ ${pacmak} ${OPTS} -v --no-parallel $packagedirs
8585
# Test custom pack command
8686
clean_dists
8787
echo "Testing yarn custom pack command."
88-
${pacmak} ${OPTS} -v --pack-command='yarn pack -f custom.tgz -s && echo custom.tgz' ${PWD}/../../@scope/jsii-calc-base-of-base
88+
${pacmak} ${OPTS} -v --pack-command='yarn pack -f custom.tgz -s && echo custom.tgz' ${PWD}/../../@scope/jsii-calc-base-of-base
89+
90+
# Test custom mvn settings command
91+
clean_dists
92+
echo "Testing custom mvn parameters."
93+
${pacmak} ${OPTS} -v --mvn-builder=singlethreaded --mvn-threads=4 $packagedirs

0 commit comments

Comments
 (0)