mpv-locatefile-lua-script
mpv-locatefile-lua-script copied to clipboard
use mp.command_native instead of os.execute on Windows
This can realize that the command window is no longer open up on Windows
@nimatrueway Do you have any opinion on this PR?
I tested your PR on macOS, it didn't work @dyphire. Unfortunately I only have macOS at this moment, and can't test Linux/Windows either.
I tested your PR on macOS, it didn't work @dyphire. Unfortunately I only have macOS at this moment, and can't test Linux/Windows either.
Oh, because I only tested it on windows, I didn't know it would destroy the use of macos/linux. I re examined the code, and it looked like I screwed up args when using subprocess. https://mpv.io/manual/master/#command-interface-args.
it should be linux_args = { 'bash', cmd }
on linux, macos should use Zsh? Not sure.
So I push the new commit to use the subprocess command only on Windows.