Skip to content

Commit

Permalink
add removal incl content
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Kossev committed Oct 16, 2023
1 parent a1fc156 commit 2151cf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/utils/generate-manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import yaml
import subprocess
import shutil

def parse_yaml_files_in_directory(directory):

Expand Down Expand Up @@ -70,8 +71,8 @@ def run_helm_template_cmd(chart_path, release_name, value_files, output_manifest
def remove_directory_if_exists(directory_path):
if os.path.exists(directory_path):
try:
os.rmdir(directory_path) # Remove the directory
print(f"Directory '{directory_path}' removed.")
shutil.rmtree(directory_path) # Remove the directory
print(f"Directory incl. content '{directory_path}' removed.")
return True
except OSError as e:
print(f"Error removing directory '{directory_path}': {str(e)}")
Expand Down

0 comments on commit 2151cf3

Please sign in to comment.