Skip to content

Commit f778068

Browse files
authored
Merge pull request #38 from DannyBen/dependencies
Add support for specifying dependencies
2 parents 5c8f611 + 4ee4ff1 commit f778068

File tree

26 files changed

+428
-2
lines changed

26 files changed

+428
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ args:
177177
# If this is provided, then you cannot specify commands.
178178
flags:
179179
- ... see below ...
180+
181+
# Specify an array of any required external dependencies (commands).
182+
# The script execution will be halted with a friendly error unless all
183+
# dependency commands exist.
184+
dependencies:
185+
- curl
180186
```
181187
182188

Runfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ def examples
3030
"examples/config-ini/configly",
3131
"examples/custom-includes/download",
3232
"examples/custom-strings/download",
33+
"examples/dependencies/cli",
3334
"examples/docker-like/docker",
35+
"examples/environment-variables/cli",
3436
"examples/git-like/git",
3537
"examples/minimal/download",
3638
"examples/multiline/multi",
3739
"examples/subcommands/cli",
38-
"examples/environment-variables/cli",
3940
"examples/yaml/yaml",
4041
"spec/fixtures/workspaces/short-flag/rush",
4142
]

examples/colors/colorly

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ parse_requirements() {
116116

117117
esac
118118
# :command.environment_variables_filter
119+
# :command.dependencies_filter
119120
# :command.command_filter
120121
action="root"
121122
# :command.required_args_filter

examples/config-ini/configly

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ parse_requirements() {
291291

292292
esac
293293
# :command.environment_variables_filter
294+
# :command.dependencies_filter
294295
# :command.command_filter
295296
action=$1
296297

@@ -364,6 +365,7 @@ configly_set_parse_requirements() {
364365

365366
esac
366367
# :command.environment_variables_filter
368+
# :command.dependencies_filter
367369
# :command.command_filter
368370
action="set"
369371
# :command.required_args_filter
@@ -428,6 +430,7 @@ configly_get_parse_requirements() {
428430

429431
esac
430432
# :command.environment_variables_filter
433+
# :command.dependencies_filter
431434
# :command.command_filter
432435
action="get"
433436
# :command.required_args_filter
@@ -481,6 +484,7 @@ configly_list_parse_requirements() {
481484

482485
esac
483486
# :command.environment_variables_filter
487+
# :command.dependencies_filter
484488
# :command.command_filter
485489
action="list"
486490
# :command.required_args_filter

examples/custom-includes/download

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ parse_requirements() {
8888

8989
esac
9090
# :command.environment_variables_filter
91+
# :command.dependencies_filter
9192
# :command.command_filter
9293
action="root"
9394
# :command.required_args_filter

examples/custom-strings/download

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ parse_requirements() {
8383

8484
esac
8585
# :command.environment_variables_filter
86+
# :command.dependencies_filter
8687
# :command.command_filter
8788
action="root"
8889
# :command.required_args_filter

examples/dependencies/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Environment Variables Example
2+
==================================================
3+
4+
This example was generated with:
5+
6+
$ bashly init
7+
$ bashly generate

0 commit comments

Comments
 (0)