File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ function main {
63
63
fi
64
64
validate_os
65
65
setup_environment
66
- ensure_dependencies
66
+ require_dependencies
67
67
start " $@ "
68
68
}
69
69
@@ -107,9 +107,9 @@ function setup_environment {
107
107
ensure_target_init_command
108
108
}
109
109
110
- function ensure_dependencies {
111
- ensure_fswatch
112
- ensure_expect
110
+ function require_dependencies {
111
+ require_fswatch
112
+ require_expect
113
113
}
114
114
115
115
function start_auto_survey {
@@ -277,19 +277,15 @@ function replace_line {
277
277
rm -f " ${file} .new"
278
278
}
279
279
280
- function ensure_fswatch {
280
+ function require_fswatch {
281
281
if ! hash fswatch 2> /dev/null; then
282
- log " fswatch is not installed. installing via brew..."
283
- # bsd/macos specific implementation
284
- brew install fswatch
282
+ quit ' "fswatch" is required. type `brew install fswatch` to install it, then relaunch the server.'
285
283
fi
286
284
}
287
285
288
- function ensure_expect {
286
+ function require_expect {
289
287
if ! hash expect 2> /dev/null || ! hash autoexpect 2> /dev/null; then
290
- log " expect or autoexpect are not installed. installing via brew..."
291
- # bsd/macos specific implementation
292
- brew install expect
288
+ quit ' "expect" is required. type `brew install expect` to install it, then relaunch the server.'
293
289
fi
294
290
}
295
291
@@ -316,7 +312,8 @@ function log {
316
312
function quit {
317
313
local errMsg=" $1 "
318
314
if [[ -n " $errMsg " ]]; then
319
- log " fatal: $errMsg "
315
+ log " fatal: $errMsg
316
+ "
320
317
else
321
318
usage
322
319
fi
You can’t perform that action at this time.
0 commit comments