Skip to content
Snippets Groups Projects
Commit 147aa595ffc9 authored by Carine Dengler's avatar Carine Dengler
Browse files

fix: fix uncatched IndexError if no arguments are passed

parent a12700830ce4
No related branches found
No related tags found
No related merge requests found
import os
import glob import glob
import sys import sys
...@@ -15,8 +14,11 @@ ...@@ -15,8 +14,11 @@
--destination $CI_REGISTRY_IMAGE/{project} --destination $CI_REGISTRY_IMAGE/{project}
''' '''
if sys.argv[1]: try:
TEMPLATE += f" --build-arg {sys.argv[1]}={sys.argv[2]}" if sys.argv[1]:
TEMPLATE += f" --build-arg {sys.argv[1]}={sys.argv[2]}"
except IndexError:
pass
with open('.gitlab-ci.yml', 'w') as f: with open('.gitlab-ci.yml', 'w') as f:
for filepath in sorted(glob.glob('library/**/Dockerfile', recursive=True)): for filepath in sorted(glob.glob('library/**/Dockerfile', recursive=True)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment