fix type issue if python is missing when running unsandboxed (#610)

Clean up a small recently introduced type issue.
pull/611/head
Paul Fitzpatrick 10 months ago committed by GitHub
parent 2e4a8ab8e0
commit 016ab66ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -999,7 +999,7 @@ const FAKETIME = '2020-01-01 00:00:00';
* Find a plausible version of python to run, if none provided.
* The preferred version is only used if command is not specified.
*/
function findPython(command: string|undefined, preferredVersion?: string) {
function findPython(command: string|undefined, preferredVersion?: string): string {
if (command) { return command; }
// No command specified. In this case, grist-core looks for a "venv"
// virtualenv; a python3 virtualenv would be in "sandbox_venv3".
@ -1028,6 +1028,7 @@ function findPython(command: string|undefined, preferredVersion?: string) {
return pythonPath;
}
}
throw new Error('Cannot find Python');
}
/**

Loading…
Cancel
Save