From 25ec1e9a239e7b4d798136364a642aa9b1dc8408 Mon Sep 17 00:00:00 2001 From: Zach Carroll Date: Fri, 1 Mar 2024 19:53:24 -0500 Subject: [PATCH] Revert "Use `shell=False` in `subprocess` Function Calls (#3)" This reverts commit c291ac9347893cb5bc16ebaeb845d9343eccdd4b. --- jtd_codebuild/generators/generator.py | 3 ++- jtd_codebuild/generators/typescript_generator.py | 3 ++- jtd_codebuild/tests/test_example_project_1.py | 3 ++- jtd_codebuild/tests/test_example_project_2.py | 3 ++- jtd_codebuild/tests/test_example_project_3.py | 3 ++- jtd_codebuild/tests/test_example_project_4.py | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jtd_codebuild/generators/generator.py b/jtd_codebuild/generators/generator.py index 32577a5..e14d902 100644 --- a/jtd_codebuild/generators/generator.py +++ b/jtd_codebuild/generators/generator.py @@ -68,7 +68,8 @@ def generate( safe_mkdir(target_path) process = subprocess.Popen( self._codegen_command(self.schema_path, target_path, target_language), - shell=False, stdout=subprocess.PIPE, + shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) return [process] diff --git a/jtd_codebuild/generators/typescript_generator.py b/jtd_codebuild/generators/typescript_generator.py index 4535244..1777441 100644 --- a/jtd_codebuild/generators/typescript_generator.py +++ b/jtd_codebuild/generators/typescript_generator.py @@ -21,7 +21,8 @@ def _compile_typescript(self, tsconfig_path: str) -> subprocess.Popen: """ return subprocess.run( f"tsc --project {tsconfig_path}", - shell=False, stdout=subprocess.PIPE, + shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) diff --git a/jtd_codebuild/tests/test_example_project_1.py b/jtd_codebuild/tests/test_example_project_1.py index 2732f91..02d9d83 100644 --- a/jtd_codebuild/tests/test_example_project_1.py +++ b/jtd_codebuild/tests/test_example_project_1.py @@ -14,7 +14,8 @@ def test_example_project_1(): # Run the command subprocess.check_call( "jtd-codebuild fixtures/example_project_1", - shell=False, cwd=cwd, + shell=True, + cwd=cwd, ) # Check the output diff --git a/jtd_codebuild/tests/test_example_project_2.py b/jtd_codebuild/tests/test_example_project_2.py index 0d800ce..9c0762b 100644 --- a/jtd_codebuild/tests/test_example_project_2.py +++ b/jtd_codebuild/tests/test_example_project_2.py @@ -13,7 +13,8 @@ def test_example_project_2(): # Run the command subprocess.check_call( "jtd-codebuild fixtures/example_project_2", - shell=False, cwd=cwd, + shell=True, + cwd=cwd, ) # Check the output diff --git a/jtd_codebuild/tests/test_example_project_3.py b/jtd_codebuild/tests/test_example_project_3.py index a37ff96..a594b4e 100644 --- a/jtd_codebuild/tests/test_example_project_3.py +++ b/jtd_codebuild/tests/test_example_project_3.py @@ -13,7 +13,8 @@ def test_example_project_3(): # Run the command subprocess.check_call( "jtd-codebuild fixtures/example_project_3", - shell=False, cwd=cwd, + shell=True, + cwd=cwd, ) # Check the output diff --git a/jtd_codebuild/tests/test_example_project_4.py b/jtd_codebuild/tests/test_example_project_4.py index 85ad363..7f9395e 100644 --- a/jtd_codebuild/tests/test_example_project_4.py +++ b/jtd_codebuild/tests/test_example_project_4.py @@ -13,7 +13,8 @@ def test_example_project_4(): # Run the command subprocess.check_call( "jtd-codebuild fixtures/example_project_4", - shell=False, cwd=cwd, + shell=True, + cwd=cwd, ) # Check the output pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy