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

Function forgeConfigIsValidFilePath

packages/api/core/src/util/forge-config.ts:129–138  ·  view source on GitHub ↗
(
  dir: string,
  forgeConfig: string | ForgeConfig,
)

Source from the content-addressed store, hash-verified

127}
128
129export async function forgeConfigIsValidFilePath(
130 dir: string,
131 forgeConfig: string | ForgeConfig,
132): Promise<boolean> {
133 return (
134 typeof forgeConfig === 'string' &&
135 ((await fs.pathExists(path.resolve(dir, forgeConfig))) ||
136 fs.pathExists(path.resolve(dir, `${forgeConfig}.js`)))
137 );
138}
139
140const eta = new Eta({ useWith: true, autoEscape: false, autoTrim: false });
141

Callers 2

forge-config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected