Skip to content

Commit

Permalink
Merge pull request #294 from macropin/master
Browse files Browse the repository at this point in the history
fix test for execute permission of script file
increments #patch
  • Loading branch information
jekkel authored Jul 5, 2023
2 parents 26dad88 + 74fc7ef commit 392b839
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ def unique_filename(filename, namespace, resource, resource_name):


def execute(script_path):
logger.debug(f"Executing script from {script_path}")
logger.info(f"Executing script from {script_path}")
try:
file_stat = os.stat(script_path)
if file_stat.st_mode & stat.S_IXOTH:
if os.access(script_path, os.X_OK):
result = subprocess.run([script_path],
capture_output=True,
check=True)
Expand Down

0 comments on commit 392b839

Please sign in to comment.