Skip to content

Commit

Permalink
Merge pull request opendatahub-io#207 from tumido/make-standalone-exe…
Browse files Browse the repository at this point in the history
…cutable

chore: ensure the standalone.py is always executable
  • Loading branch information
leseb authored Nov 22, 2024
2 parents c5133e2 + 3194658 commit 274f3c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def gen_standalone():
Example usage: ''' $ python pipeline.py gen-standalone '''
"""
from os import path
from os import chmod, path

import yaml
from jinja2 import Template
Expand Down Expand Up @@ -595,6 +595,8 @@ def gen_standalone():
standalone_script_path = path.join("standalone", GENERATED_STANDALONE_FILE_NAME)
with open(standalone_script_path, "w", encoding="utf-8") as output_file:
output_file.write(rendered_code)
# Make the rendered file executable
chmod(standalone_script_path, 0o755)

click.echo(f"Successfully generated '{standalone_script_path}' script.")

Expand Down

0 comments on commit 274f3c2

Please sign in to comment.