From 1e449686eae7426ceb2a641f4c10eb6fab1be635 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 5 Jun 2020 11:49:47 -0700 Subject: [PATCH] Fix stdin passthrough when running start.py through run-python3 --- package.json | 12 +++++++----- run-python3.js | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c0b4c4ef907..9d1dddb4780 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "5.1.0-preview.1", "description": "The Python extension for generators in AutoRest.", "scripts": { - "prepare": "python prepare.py", - "start": "python start.py", - "install": "python install.py" + "prepare": "node run-python3.js prepare.py", + "start": "node run-python3.js start.py", + "install": "node run-python3.js install.py" }, "repository": { "type": "git", @@ -22,10 +22,12 @@ "url": "https://github.com/Azure/autorest.python/issues" }, "homepage": "https://github.com/Azure/autorest.python/blob/autorestv3/README.md", + "dependencies": { + "@azure-tools/extension": "^3.0.249" + }, "devDependencies": { "@autorest/autorest": "^3.0.0", - "@azure-tools/extension": "^3.0.249", - "@microsoft.azure/autorest.testserver": "^2.10.40" + "@microsoft.azure/autorest.testserver": "2.10.42" }, "files": [ "autorest/**/*.py", diff --git a/run-python3.js b/run-python3.js index 713f7e42aa8..f9d6ee99a11 100644 --- a/run-python3.js +++ b/run-python3.js @@ -12,7 +12,9 @@ const extension = require("@azure-tools/extension"); async function runPython3(scriptName) { const command = ["python"]; await extension.updatePythonPath(command); - cp.execSync(command[0] + " " + scriptName); + cp.execSync(command[0] + " " + scriptName, { + stdio: [0, 1, 2] + }); } runPython3(process.argv[2]).catch(err => {