machinaos 0.0.23 → 0.0.24
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.
- package/client/package.json +1 -1
- package/install.sh +19 -0
- package/package.json +1 -1
package/client/package.json
CHANGED
package/install.sh
CHANGED
|
@@ -142,19 +142,38 @@ install_node() {
|
|
|
142
142
|
debian)
|
|
143
143
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
144
144
|
sudo apt-get install -y nodejs
|
|
145
|
+
# Force rehash PATH to find newly installed node
|
|
146
|
+
hash -r 2>/dev/null || true
|
|
147
|
+
# Source profile to update PATH if needed
|
|
148
|
+
[ -f /etc/profile ] && source /etc/profile 2>/dev/null || true
|
|
145
149
|
;;
|
|
146
150
|
redhat)
|
|
147
151
|
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
|
|
148
152
|
sudo dnf install -y nodejs
|
|
153
|
+
hash -r 2>/dev/null || true
|
|
149
154
|
;;
|
|
150
155
|
arch)
|
|
151
156
|
sudo pacman -S --noconfirm nodejs npm
|
|
157
|
+
hash -r 2>/dev/null || true
|
|
152
158
|
;;
|
|
153
159
|
*)
|
|
154
160
|
error_exit "Please install Node.js 22+ manually from https://nodejs.org/"
|
|
155
161
|
;;
|
|
156
162
|
esac
|
|
157
163
|
|
|
164
|
+
# Clear hash and verify using full path as fallback
|
|
165
|
+
hash -r 2>/dev/null || true
|
|
166
|
+
|
|
167
|
+
# Check using direct path first (NodeSource installs to /usr/bin/node)
|
|
168
|
+
if [ -x /usr/bin/node ]; then
|
|
169
|
+
version=$(/usr/bin/node --version | tr -d 'v')
|
|
170
|
+
major=$(echo "$version" | cut -d. -f1)
|
|
171
|
+
if [ "$major" -ge "$MIN_NODE_VERSION" ]; then
|
|
172
|
+
success "Node.js v$version installed"
|
|
173
|
+
return 0
|
|
174
|
+
fi
|
|
175
|
+
fi
|
|
176
|
+
|
|
158
177
|
if ! check_node; then
|
|
159
178
|
error_exit "Failed to install Node.js. Please install manually."
|
|
160
179
|
fi
|