If I call npx truffle run verify MyContract --forceConstructorArgs string: --network mainnet --debug my override is not taken into account. This is happening because of following line, since empty string is falsey.
Thanks for the bug report and for finding the cause as well. I updated that code so that you can pass an empty string as constructor args and published it in v0.5.24.
Describe the feature
If I call
npx truffle run verify MyContract --forceConstructorArgs string: --network mainnet --debug
my override is not taken into account. This is happening because of following line, since empty string is falsey.const encodedConstructorArgs = options.forceConstructorArgs || await fetchConstructorValues(artifact, options)
I want to be able to force empty constructor args. Maybe add separate flag for this?