1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-09-11 18:27:21 +03:00

fix(server): Python bridge fails to execute on Windows intent object absolute path because of whitespace

This commit is contained in:
louistiti 2022-11-06 22:18:09 +08:00
parent ddf389ffd1
commit becac3b0f6
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ dotenv.config()
try {
const executionStart = Date.now()
const p = await command(
`${PYTHON_BRIDGE_BIN_PATH} scripts/assets/intent-object.json`,
`${PYTHON_BRIDGE_BIN_PATH} "scripts/assets/intent-object.json"`,
{ shell: true }
)
const executionEnd = Date.now()

View File

@ -224,7 +224,7 @@ class Brain {
try {
fs.writeFileSync(intentObjectPath, JSON.stringify(intentObj))
this.process = spawn(
`${PYTHON_BRIDGE_BIN_PATH} ${intentObjectPath}`,
`${PYTHON_BRIDGE_BIN_PATH} "${intentObjectPath}"`,
{ shell: true }
)
} catch (e) {