File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,15 @@ def box_init(args):
186186 """Initializes a LayersBox"""
187187 print ("Initializing LayersBox..." )
188188 dst = args .directory
189+ if not os .path .exists (dst ):
190+ os .makedirs (dst )
189191 url = "THIS SHOULD HAVE BEEN REPLACED"
190192 try :
191193 url = read_url (dst )
192194 print ("Found existing configuration, using URL https://{}/" .format (url ))
193195 except :
194196 url = raw_input ("Enter the URL the box should be reachable at. (Don't put a / at the end)\n https://" ).strip ("/" )
195- with open ("common.env" , 'w' ) as f :
197+ with open (join ( dst , "common.env" ) , 'w' ) as f :
196198 f .write ("LAYERS_API_URI=https://{}/\n " .format (url ))
197199 f .write ("LAYERS_API_URL=https://{}/\n " .format (url ))
198200 f .write ("LAYERS_APP_URI=https://{}/\n " .format (url ))
You can’t perform that action at this time.
0 commit comments