Skip to content

Commit

Permalink
refactoring, add note on execve
Browse files Browse the repository at this point in the history
  • Loading branch information
aerickson committed Aug 7, 2024
1 parent 257d861 commit e00edde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions tf_authoritative_scanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import argparse
import os.path

from tf_authoritative_scanner.util import _get_version
from tf_authoritative_scanner.util import _get_version, remove_leading_trailing_newline


class TFAuthoritativeScanner:
Expand Down Expand Up @@ -175,14 +175,6 @@ def run(self, paths):
sys.exit(0)


def remove_leading_trailing_newline(text):
if text.startswith("\n"):
text = text[1:]
if text.endswith("\n"):
text = text[:-1]
return text


def print_tfas_banner():
# return
print(
Expand Down
1 change: 1 addition & 0 deletions tf_authoritative_scanner/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run_tfas_and_terraform(self, args):
print()

# Replace the current process with `terraform` command
# - avoids subprocess' issues with delaying output
os.execvp(full_cmd_list[0], full_cmd_list)

def print_tfast_banner(self):
Expand Down

0 comments on commit e00edde

Please sign in to comment.