-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStart Wizard.command
More file actions
executable file
·43 lines (35 loc) · 1.05 KB
/
Copy pathStart Wizard.command
File metadata and controls
executable file
·43 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
set -u
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "$SCRIPT_DIR" || exit 1
if ! command -v node >/dev/null 2>&1; then
echo "Node.js 22 or newer is required."
echo "Install it from https://nodejs.org/ and double-click this file again."
printf "Press Return to close..."
read -r _
exit 1
fi
if ! node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 22 ? 0 : 1)'; then
echo "Your Node.js version is too old. Version 22 or newer is required."
echo "Update it from https://nodejs.org/ and double-click this file again."
printf "Press Return to close..."
read -r _
exit 1
fi
if [ ! -d node_modules/ssh2 ]; then
echo "Preparing the local setup wizard..."
if ! npm ci --ignore-scripts; then
echo "The wizard could not install its local dependency."
printf "Press Return to close..."
read -r _
exit 1
fi
fi
npm start
status=$?
if [ "$status" -ne 0 ] && [ "$status" -ne 130 ]; then
echo "The local wizard stopped with an error."
printf "Press Return to close..."
read -r _
fi
exit "$status"