Skip to content

Commit

Permalink
dorothy-new: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 2, 2023
1 parent 93a359c commit 6e720aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lint:
enabled:
- [email protected]
- [email protected]
- [email protected].12
- [email protected].16
- [email protected]
- [email protected]
- git-diff-check@SYSTEM
Expand All @@ -34,7 +34,7 @@ lint:
- [email protected]
- [email protected]
- [email protected]
- trufflehog@3.60.4
- trufflehog@3.62.1
- [email protected]
disabled:
- trivy
Expand Down
2 changes: 1 addition & 1 deletion commands.beta/dorothy-new
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function dorothy_new() (
--question="Which ecosystems does $name have a package on" \
--label -- "${eco_options[@]}"
)
for eco in "${ecosystems[@]}"; do
for eco in "${ecos_selection[@]}"; do
ecos["$eco"]="$(ask --question="What is the $eco package name?")"
done
;;
Expand Down
2 changes: 1 addition & 1 deletion docs/scripting/generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The following is a proposal for a new command generator:

```
```txt
What type of command is this?
normal: process arguments, execute something
echo-*: transform input (args/stdin) into modified output
Expand Down
10 changes: 5 additions & 5 deletions sources/bash.bash
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function eval_capture {
trap 'EXIT_STATUS=$?; if test "${FUNCNAME-}" = 'eval_capture_wrapper'; then return 0; elif test -n "${FUNCNAME-}"; then return "$EXIT_STATUS"; else exit "$EXIT_STATUS"; fi' ERR

# fetch (if supplied) the variables that will store the command exit status, the stdout output, the stderr output, and/or the stdout+stderr output
local item cmd=() exit_status_local exit_status_variable='exit_status_local' stdout_variable='' stdout_temp_file='' stderr_variable='' stderr_temp_file='' output_variable='' output_temp_file='' stdout_pipe='/dev/stdout' stderr_pipe='/dev/stderr'
local item eval_capture_command=() exit_status_local exit_status_variable='exit_status_local' stdout_variable='' stdout_temp_file='' stderr_variable='' stderr_temp_file='' output_variable='' output_temp_file='' stdout_pipe='/dev/stdout' stderr_pipe='/dev/stderr'
while test "$#" -ne 0; do
item="$1"
shift
Expand Down Expand Up @@ -206,7 +206,7 @@ function eval_capture {
stderr_pipe="$stdout_pipe"
;;
'--')
cmd+=("$@")
eval_capture_command+=("$@")
shift $#
break
;;
Expand All @@ -215,7 +215,7 @@ function eval_capture {
return 22 # EINVAL 22 Invalid argument
;;
*)
cmd+=(
eval_capture_command+=(
"$item"
"$@"
)
Expand Down Expand Up @@ -246,8 +246,8 @@ function eval_capture {
function eval_capture_wrapper {
# set +e
# EXIT_STATUS=0
"${cmd[@]}"
# print_line "${cmd[*]} => $EXIT_STATUS" >/dev/tty
"${eval_capture_command[@]}"
# print_line "${eval_capture_command[*]} => $EXIT_STATUS" >/dev/tty
# set -e
}
if test -n "$output_variable"; then
Expand Down

0 comments on commit 6e720aa

Please sign in to comment.