Skip to content

Commit

Permalink
fix(serve): quote python executable on POSIX (#4122)
Browse files Browse the repository at this point in the history
* fix: quote executable when creating watchers

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

* fix: only quote on non-windows platform

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

* Update src/bentoml/serve.py

---------

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
Co-authored-by: bojiang <5886138+bojiang@users.noreply.github.com>
  • Loading branch information
aarnphm and bojiang committed Aug 24, 2023
1 parent 666febd commit 53db471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bentoml/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import json
import logging
import os
import shlex
import shutil
import sys
import tempfile
Expand Down Expand Up @@ -104,7 +105,7 @@ def create_watcher(

return Watcher(
name=name,
cmd=cmd,
cmd=shlex.quote(cmd) if psutil.POSIX else cmd,
args=args,
copy_env=True,
stop_children=True,
Expand Down

0 comments on commit 53db471

Please sign in to comment.