MCPcopy
hub / github.com/electron/forge / getGitVersion

Function getGitVersion

packages/api/cli/src/util/check-system.ts:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16const d = debug('electron-forge:check-system');
17
18async function getGitVersion(): Promise<string | null> {
19 return new Promise<string | null>((resolve) => {
20 exec('git --version', (err, output) =>
21 err
22 ? resolve(null)
23 : resolve(output.toString().trim().split(' ').reverse()[0]),
24 );
25 });
26}
27
28/**
29 * Packaging an app with Electron Forge requires `node_modules` to be on disk.

Callers 1

checkSystemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected