subprocess(): Use isAbsolute instead of checking for slash (#3911)

This commit is contained in:
Abe Jellinek 2024-04-01 16:22:05 -04:00 committed by GitHub
parent ff28541245
commit 669574b484
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -615,7 +615,7 @@ Zotero.Utilities.Internal = {
*/
subprocess: async function (command, args = []) {
// eslint-disable-next-line no-undef
command = command.includes('/') ? command : await Subprocess.pathSearch(command);
command = PathUtils.isAbsolute(command) ? command : await Subprocess.pathSearch(command);
Zotero.debug("Running " + command + " " + args.map(arg => "'" + arg + "'").join(" "));