MCPcopy Create free account
hub / github.com/alibaba/open-code-review / getInstalledVersion

Function getInstalledVersion

scripts/update.js:64–75  ·  view source on GitHub ↗
(binPath)

Source from the content-addressed store, hash-verified

62}
63
64function getInstalledVersion(binPath) {
65 try {
66 const result = spawnSync(binPath, ["version"], {
67 encoding: "utf8",
68 timeout: 3000,
69 windowsHide: true,
70 });
71 return parseVersionOutput(result.stdout);
72 } catch (_) {
73 return null;
74 }
75}
76
77function fetchLatestVersion(pkg) {
78 const registry = (pkg.publishConfig && pkg.publishConfig.registry) || DEFAULT_REGISTRY;

Callers 1

mainFunction · 0.85

Calls 1

parseVersionOutputFunction · 0.85

Tested by

no test coverage detected