Skip to content

Commit

Permalink
updated the cloc to generate cmd file compatible with mac
Browse files Browse the repository at this point in the history
  • Loading branch information
BrijeshKrishnan committed Nov 28, 2024
1 parent a218cd3 commit 54037bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eaglevision/cloc_eagle.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ def __cmd_builder(self):
def __write_cmd(self):
""" Function to create a batch file to execute cloc """
file_out = open(os.path.join(self.report_path, "cloc.cmd"), "w")
is_windows = sys.platform.startswith('win')
if not is_windows:
file_out.write("#! /bin/bash")
file_out.write("\n")
file_out.write(self.cmd)
file_out.close()
if not is_windows:
os.system("chmod +x %s"%os.path.join(self.report_path, "cloc.cmd"))

def __subprocess_out(self):
""" Function to execute cloc command """
Expand Down

0 comments on commit 54037bb

Please sign in to comment.