ueli
ueli copied to clipboard
Impossible to input any command after commandline tool (BUG)
I need to create shortcut to open FirefoxPortable.exe with parameters -no-deelevate, standart
FirefoxPortable.exe -no-deelevate
I tried to create shortcut with "commandline tool", because "File path" type is not work.
But after launching Firefox when i launch uelie console again its impossible to input any command (here is no any text cursor, also known as a caret) until i close Firefox
What happens if you type in this for the command:
Start "" "C:\Programs\Firefox\FirefoxPortable.exe" -no-deelevate
What happens if you type in this for the command:
Start "" "C:\Programs\Firefox\FirefoxPortable.exe" -no-deelevate
I checked - still same problem with "commandline tool"
But when i made *.bat file contains start command and launch with "File path" tool - its continue to work
This is bug happens due to the fact that the shortcuts-plugin
waits for the promise of the command-exector
to resolve. The used exec()
call waits for the started process to end or die until it's callback is triggered and until then blocks the Ui.
I played around with this a bit and it helps with the shortcuts issue.
export function spawnCommand(command: string): Promise<void> {
return new Promise((resolve, reject) => {
const spawnOptions: SpawnOptions = {
detached: true,
shell: true,
stdio: "ignore"
}
spawn(command, spawnOptions).on("error", reject).on("spawn", resolve);
});
}
new ShortcutsSearchPlugin(
config.shortcutOptions,
urlExecutor,
filePathExecutor,
filePathLocationExecutor,
spawnCommand,
),