Skip to content

Commit 3250c24

Browse files
committed
test
1 parent 9e91aa4 commit 3250c24

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"@vueuse/components": "13.1.0",
5353
"@vueuse/nuxt": "13.1.0",
5454
"ajv": "8.17.1",
55-
"command-exists": "^1.2.9",
5655
"get-port-please": "3.2.0",
5756
"is-electron": "2.2.2",
5857
"js-file-download": "0.4.12",
@@ -84,4 +83,4 @@
8483
"publishConfig": {
8584
"access": "public"
8685
}
87-
}
86+
}

utils/local.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import WebSocket from "ws"
88
import pkg from "electron"
99
const { app, dialog } = pkg
1010
import { getPort } from "get-port-please"
11-
import { sync as commandExistsSync } from "command-exists"
1211
import isElectron from "is-electron"
1312
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json" with { type: "json" }
1413
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
@@ -58,6 +57,14 @@ function get_available_port() {
5857
})
5958
}
6059

60+
function commandExistsSync(executable_name) {
61+
const envPath = process.env.PATH || ""
62+
return envPath.split(path.delimiter).some((dir) => {
63+
const filePath = path.join(dir, executable_name)
64+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile()
65+
})
66+
}
67+
6168
async function run_script(
6269
executable_name,
6370
executable_path,

0 commit comments

Comments
 (0)