Mac build works. Windows does not (vendor binary)

This commit is contained in:
Cris Stringfellow 2023-01-14 18:30:40 +08:00
parent 8c5b89f92b
commit 698d9f6e34
No known key found for this signature in database
4 changed files with 8 additions and 4 deletions

View File

@ -31,7 +31,8 @@
"pkg": {
"scripts": "build/**/*.js",
"assets": [
"public/**/*"
"public/**/*",
"build/vendor/**/*"
],
"outputPath": "bin"
},

View File

@ -6,4 +6,5 @@
echo "#!/usr/bin/env node" > build/diskernet.cjs
cat build/out.cjs >> build/diskernet.cjs
chmod +x build/diskernet.cjs
cp -r node_modules/ps-list-commonjs/vendor build/

View File

@ -64,7 +64,7 @@ async function start() {
const list = await psList();
chromeOpen = list.some(({name,cmd}) => name.match(/chrome/g) || cmd.match(/chrome/g));
chromeOpen = list.some(({name,cmd}) => name?.match?.(/chrome/g) || cmd?.match?.(/chrome/g));
if ( chromeOpen ) {
console.info(`Seems Chrome is open`);

View File

@ -3,10 +3,12 @@ import {fileURLToPath} from 'url';
import fs from 'fs';
import os from 'os';
const DEEB = false;
export const DEBUG = {
askFirst: true,
verboseSlow: false,
debug: process.env.DEBUG_22120 || false,
verboseSlow: process.env.VERBOSE_DEBUG_22120 || DEEB,
debug: process.env.DEBUG_22120 || DEEB,
checkPred: false
}
export const SHOW_FETCH = false;