File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Internal Run Example
2
2
3
- This example demonstrates how to utilize the internal ` run ` function in order
4
- to call other commands internally, using the same syntax as would be used by
5
- a user in the CLI.
3
+ This example demonstrates how to use the ` run ` function to call commands
4
+ internally, using the exact same syntax as a user would in the CLI. This
5
+ approach can be useful for chaining commands or reusing logic without
6
+ duplicating code.
6
7
7
8
This example was generated with:
8
9
@@ -14,6 +15,15 @@ $ bashly generate
14
15
$ bashly generate
15
16
```
16
17
18
+ Note that while this pattern of calling ` run ` internally is supported, you may
19
+ want to consider using [ lib functions]
20
+ instead, for a more robust codebase.
21
+
22
+ While this pattern of calling run internally is supported, you may want to
23
+ consider using [ lib functions] ( https://bashly.dannyb.co/usage/writing-your-scripts/#adding-common-functions )
24
+ instead. lib functions can help create a more robust and maintainable codebase
25
+ by centralizing reusable logic.
26
+
17
27
<!-- include: src/build_command.sh -->
18
28
<!-- include: src/test_command.sh -->
19
29
<!-- include: src/deploy_command.sh -->
You can’t perform that action at this time.
0 commit comments