There's a bug in the current task builder validations where trying to set the default value of a variadic parameter to an empty array throws an error.
const testTask = task("test", "Runs mocha tests")
.addVariadicParameter({
name: "testFiles",
description: "An optional list of files to test",
defaultValue: [], // this fails, but it shouldn't
})
There's a bug in the current task builder validations where trying to set the default value of a variadic parameter to an empty array throws an error.
The bug is here: parameters.ts line 39.
Removing value.length > 0 should be enough to fix it. Make sure to update the tests to ensure it works as expected.