File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 2121)
2222
2323refinery_dir = sys .argv [1 ]
24+ is_windows = sys .argv [2 ].lower () == "windows"
2425
2526if wait_until_refinery_is_ready (timeout = 1 ):
2627 print ("Refinery is already running!" , flush = True )
2728 sys .exit (0 )
2829
2930print ("Creating docker-compose.yml file..." , flush = True )
30- minio_endpoint = process_docker_compose_template (refinery_dir )
31+ minio_endpoint = process_docker_compose_template (refinery_dir , is_windows )
3132print ("Creating jwks.json secret..." , flush = True )
3233create_jwks_secret_if_not_existing ()
3334print ("Checking and pulling exec env images..." , flush = True )
Original file line number Diff line number Diff line change 11import json
2- import os
2+ import sys
33
44from util .constants import (
55 DOCKER_COMPOSE ,
1010from util .docker_helper import get_credential_ip , get_host_ip
1111
1212
13- def process_docker_compose_template (refinery_dir : str ) -> str :
13+ def process_docker_compose_template (refinery_dir : str , is_windows : bool ) -> str :
1414 credential_ip = get_credential_ip ()
1515 host_ip = get_host_ip ()
1616
@@ -25,8 +25,18 @@ def process_docker_compose_template(refinery_dir: str) -> str:
2525
2626 with open (SETTINGS , "r" ) as f :
2727 settings = json .load (f )
28- for volume , rel_path in settings .items ():
29- settings [volume ] = os .path .normpath (os .path .join (refinery_dir , rel_path ))
28+ path_sep = "\\ " if is_windows else "/"
29+ for volume , path in settings .items ():
30+ if path .startswith (".." ):
31+ print ("Path in settings.json must not start with '..'!" , flush = True )
32+ sys .exit (1 )
33+ if refinery_dir [0 ] == "." : # relative path
34+ path = path [1 :]
35+ if path [0 ] != path_sep :
36+ path = path_sep + path [1 :]
37+ settings [volume ] = refinery_dir + path
38+ else :
39+ settings [volume ] = path
3040
3141 docker_compose = template .format (
3242 ** versions ,
You can’t perform that action at this time.
0 commit comments