-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5681 from NomicFoundation/feature/help-command-sh…
…ow-values-for-arguments-and-options Help messages don't display the default values of options and positional arguments
- Loading branch information
Showing
5 changed files
with
98 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
v-next/hardhat/test/fixture-projects/cli/parsing/default-values/hardhat.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { HardhatUserConfig } from "@ignored/hardhat-vnext-core/config"; | ||
|
||
import { task } from "@ignored/hardhat-vnext-core/config"; | ||
|
||
const customTask = task("test", "subtask") | ||
.setAction(async () => {}) | ||
.addOption({ | ||
name: "opt", | ||
description: "opt description", | ||
defaultValue: "opt default value", | ||
}) | ||
.addPositionalArgument({ | ||
name: "pos1", | ||
description: "pos1 description", | ||
}) | ||
.addPositionalArgument({ | ||
name: "pos2", | ||
description: "pos2 description", | ||
defaultValue: "pos2 default value", | ||
}) | ||
.addVariadicArgument({ | ||
name: "var1", | ||
description: "var1 description", | ||
defaultValue: ["var1 default value 1", "var1 default value 2"], | ||
}) | ||
.build(); | ||
|
||
const config: HardhatUserConfig = { | ||
tasks: [customTask], | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters