修复路径
This commit is contained in:
parent
d0fbc89012
commit
b0586cec23
2 changed files with 5 additions and 2 deletions
5
main.py
5
main.py
|
@ -1,5 +1,6 @@
|
|||
import json
|
||||
import os
|
||||
import shlex
|
||||
from pathlib import Path
|
||||
from subprocess import PIPE, STDOUT, Popen
|
||||
|
||||
|
@ -37,8 +38,10 @@ class Api:
|
|||
config["page"] = page
|
||||
|
||||
def run(self, command, cwd=None):
|
||||
command = shlex.split(command)
|
||||
command[0] = os.path.normpath(command)
|
||||
with Popen(
|
||||
os.path.normpath(command),
|
||||
command,
|
||||
stdout=PIPE,
|
||||
stderr=STDOUT,
|
||||
shell=True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue