Skip to content

Commit f02c365

Browse files
committed
Remove shell option
Signed-off-by: yongjunhong <[email protected]>
1 parent 91ca53d commit f02c365

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

tests/pytest/package_manager/test_android.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@pytest.mark.ubuntu
1616
def test_ubuntu(input_path, output_path, extra_args):
1717
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
18-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
18+
result = subprocess.run(command, capture_output=True, text=True)
1919
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2020
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2121

@@ -26,6 +26,6 @@ def test_ubuntu(input_path, output_path, extra_args):
2626
@pytest.mark.windows
2727
def test_windows(input_path, output_path):
2828
command = f"{DIST_PATH} -p {input_path} -o {output_path}"
29-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
29+
result = subprocess.run(command, capture_output=True, text=True)
3030
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3131
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_cocoapods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
@pytest.mark.ubuntu
1414
def test_ubuntu(input_path, output_path, extra_args):
1515
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
16-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
16+
result = subprocess.run(command, capture_output=True, text=True)
1717
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1818
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_gradle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
19+
result = subprocess.run(command, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

@@ -28,6 +28,6 @@ def test_ubuntu(input_path, output_path):
2828
@pytest.mark.windows
2929
def test_windows(input_path, output_path):
3030
command = f"{DIST_PATH} -p {input_path} -o {output_path} -m gradle"
31-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
31+
result = subprocess.run(command, capture_output=True, text=True)
3232
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3333
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_helm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
@pytest.mark.ubuntu
1414
def test_ubuntu(input_path, output_path, extra_args):
1515
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
16-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
16+
result = subprocess.run(command, capture_output=True, text=True)
1717
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1818
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_maven.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
19+
result = subprocess.run(command, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

@@ -27,6 +27,6 @@ def test_ubuntu(input_path, output_path):
2727
@pytest.mark.windows
2828
def test_windows(input_path, output_path):
2929
command = f"{DIST_PATH} -p {input_path} -o {output_path} -m maven"
30-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
30+
result = subprocess.run(command, capture_output=True, text=True)
3131
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3232
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_npm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
@pytest.mark.ubuntu
1515
def test_ubuntu(input_path, output_path, extra_args):
1616
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
17-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
17+
result = subprocess.run(command, capture_output=True, text=True)
1818
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1919
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_nuget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@pytest.mark.ubuntu
2222
def test_ubuntu(input_path, output_path):
2323
command = f"fosslight_dependency -p {input_path} -o {output_path}"
24-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
24+
result = subprocess.run(command, capture_output=True, text=True)
2525
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2626
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2727

@@ -33,6 +33,6 @@ def test_ubuntu(input_path, output_path):
3333
@pytest.mark.windows
3434
def test_windows(input_path, output_path):
3535
command = f"{DIST_PATH} -p {input_path} -o {output_path}"
36-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
36+
result = subprocess.run(command, capture_output=True, text=True)
3737
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3838
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_pub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
19+
result = subprocess.run(command, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

@@ -29,6 +29,6 @@ def test_ubuntu(input_path, output_path):
2929
@pytest.mark.windows
3030
def test_windows(input_path, output_path, extra_args):
3131
command = f"{DIST_PATH} -p {input_path} -o {output_path} {extra_args}"
32-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
32+
result = subprocess.run(command, capture_output=True, text=True)
3333
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3434
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_pypi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@pytest.mark.ubuntu
1818
def test_ubuntu(input_path, output_path, extra_args):
1919
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
20-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
20+
result = subprocess.run(command, capture_output=True, text=True)
2121
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2222
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2323

@@ -28,6 +28,6 @@ def test_ubuntu(input_path, output_path, extra_args):
2828
@pytest.mark.windows
2929
def test_windows(input_path, output_path):
3030
command = f"{DIST_PATH} -p {input_path} -o {output_path}"
31-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
31+
result = subprocess.run(command, capture_output=True, text=True)
3232
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
3333
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

0 commit comments

Comments
 (0)