skill-mix 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/install.sh +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-mix",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "main": "dist/electron/main.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,6 +19,32 @@ require_cmd() {
19
19
  fi
20
20
  }
21
21
 
22
+ is_windows_shell() {
23
+ case "$(uname -s 2>/dev/null)" in
24
+ MINGW*|MSYS*|CYGWIN*) return 0 ;;
25
+ *) return 1 ;;
26
+ esac
27
+ }
28
+
29
+ is_wsl() {
30
+ if [ -n "${WSL_DISTRO_NAME:-}" ] || [ -n "${WSL_INTEROP:-}" ]; then
31
+ return 0
32
+ fi
33
+
34
+ if [ -r /proc/version ] && grep -qiE "(microsoft|wsl)" /proc/version; then
35
+ return 0
36
+ fi
37
+
38
+ return 1
39
+ }
40
+
41
+ ensure_supported_platform() {
42
+ if is_windows_shell && ! is_wsl; then
43
+ echo "Native Windows shell detected. Please run this installer from WSL." >&2
44
+ exit 1
45
+ fi
46
+ }
47
+
22
48
  bun_root_dir() {
23
49
  if [ -n "${BUN_INSTALL:-}" ]; then
24
50
  printf "%s\n" "${BUN_INSTALL%/}"
@@ -134,6 +160,7 @@ check_install_dir() {
134
160
  fi
135
161
  }
136
162
 
163
+ ensure_supported_platform
137
164
  require_cmd git
138
165
  ensure_bun
139
166
  check_install_dir