UNPKG

check-msvc-runtime

Version:

Easily show a warning if the Microsoft Visual C++ Redistributable is not installed on Windows

25 lines (22 loc) 791 B
#!/usr/bin/env node const { isMsvcRuntimeInstalled } = require('./check'); isMsvcRuntimeInstalled().then((installed) => { if (process.platform !== 'win32') { // We only check on Windows - not relevant elsewhere process.exit(0); } if (installed) { console.log('Visual C++ Redistributable is installed.'); process.exit(0); } else { console.error( '***********************\n' + 'The Microsoft Visual C++ Runtime is not installed, and is\n' + 'required to set up this project on Windows.\n\n' + 'Install it from:\n' + 'https://learn.microsoft.com/cpp/windows/latest-supported-vc-redist\n' + '***********************\n' ); process.exit(1); } });