From a7d3bb37520a692c6e8b4b6750342a429651f64b Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Fri, 17 Dec 2021 21:26:06 +0100 Subject: [PATCH] Use cargo run in the adapter Makes it easier to start the app eliminating the danger of forgetting to build. --- adapter/adapter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/adapter.py b/adapter/adapter.py index f4bf1ba..4c064a7 100644 --- a/adapter/adapter.py +++ b/adapter/adapter.py @@ -15,9 +15,10 @@ HERE = os.path.abspath(os.path.dirname(__file__)) app = flask.Flask(__name__) CORS(app) engine = subprocess.Popen( - [os.path.join(HERE, "../rs/target/debug/schach")], + ["cargo", "run"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, + cwd=os.path.join(HERE, "../rs"), )