1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-01 03:15:58 +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:16:45 +08:00
parent 74582899a2
commit 4b003a852e
No known key found for this signature in database
GPG Key ID: 7ECA3DD523793FE6
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) {