MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / getWslInstallHint

Function getWslInstallHint

scripts/build-linux-appimage.js:40–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40function getWslInstallHint() {
41 try {
42 const osRelease = execSync('wsl cat /etc/os-release 2>/dev/null', { encoding: 'utf8', shell: true });
43 if (/ID=fedora|ID=rhel|ID=centos|ID=rocky|ID=almalinux/i.test(osRelease)) {
44 return ' wsl sudo dnf install -y nodejs npm';
45 }
46 if (/ID=arch|ID=manjaro/i.test(osRelease)) {
47 return ' wsl sudo pacman -S nodejs npm';
48 }
49 } catch (_) {
50 // ignore
51 }
52 return ' wsl sudo apt-get update\n wsl sudo apt-get install -y nodejs npm';
53}
54
55
56// Convert Windows path to WSL path

Callers 1

buildWithWSLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected