Skip to content

Commit cb80a76

Browse files
committed
setup-util: replace sd help dependency with echo-regexp
1 parent e9299a9 commit cb80a76

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: commands/setup-util

+5-3
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ function setup_util() (
116116
local invocation="$0 $*"
117117
function help {
118118
# get content of this file between <installer-options> and </installer-options>
119-
if __command_exists -- sd; then
120-
installer_options="$(sd --flags=s '.+# <installer-options>\s+|\s+# </installer-options>.+|\t|local ' '' <"${BASH_SOURCE[0]}")"
119+
local installer_options
120+
# prevent endless `setup-util` recursion
121+
if __command_exists -- deno; then
122+
installer_options="$(echo-regexp -smgf '.+# <installer-options>\s+|\s+# </installer-options>.+|\t|local ' '' <"${BASH_SOURCE[0]}")"
121123
else
122-
installer_options="$(echo-style --notice='[sd] is required to display the installer option help, install with [setup-util-sd]')"
124+
installer_options="$(echo-style --notice='[deno] is required to display the installer options, install with [setup-util-deno]')"
123125
fi
124126

125127
# output the help

0 commit comments

Comments
 (0)