fix: ensure proper type casting for Windows compatibility in LibreOffice checks
This commit is contained in:
parent
43f433597b
commit
f446b7eb55
1 changed files with 3 additions and 3 deletions
|
|
@ -286,7 +286,7 @@ export async function isLibreOfficeInstalled(): Promise<LibreOfficeCheckResult>
|
|||
const quoted = `"${candidate}"`;
|
||||
const { stdout } = await execAsync(`${quoted} --version`, {
|
||||
timeout: 8_000,
|
||||
windowsHide: process.platform === "win32",
|
||||
windowsHide: (process.platform as string) === "win32",
|
||||
});
|
||||
return { installed: true, version: stdout.trim(), path: candidate };
|
||||
} catch {
|
||||
|
|
@ -320,7 +320,7 @@ export async function isLibreOfficeInstalled(): Promise<LibreOfficeCheckResult>
|
|||
try {
|
||||
const { stdout } = await execAsync("soffice --version", {
|
||||
timeout: 8_000,
|
||||
windowsHide: process.platform === "win32",
|
||||
windowsHide: (process.platform as string) === "win32",
|
||||
});
|
||||
// Found via PATH – record the bare command name as the path so callers
|
||||
// can pass it directly to subprocess invocations.
|
||||
|
|
@ -426,4 +426,4 @@ export async function checkLibreOfficeBeforeWindow(
|
|||
|
||||
// Always proceed – never block the app
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue