Skip to content

Commit

Permalink
refactor: generated Argcfile boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Apr 17, 2024
1 parent c8558ee commit 1ceeed3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/bin/argc/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ fn generate_boilerplate(args: &[String]) -> String {
r#"
# @cmd
{cmd}() {{
echo To implement command: {cmd}
echo TODO {cmd}
}}
"#
)
Expand All @@ -362,6 +362,7 @@ fn generate_boilerplate(args: &[String]) -> String {
set -e
{tasks}
# For more information, please refer to the https://github.com/sigoden/argc
eval "$(argc --argc-eval "$0" "$@")"
"#
)
Expand Down
2 changes: 1 addition & 1 deletion tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn create_with_tasks() {
.env("PATH", path_env_var)
.arg("bar")
.assert()
.stdout(predicates::str::contains("To implement command: bar"))
.stdout(predicates::str::contains("TODO bar"))
.success();
}

Expand Down

0 comments on commit 1ceeed3

Please sign in to comment.