|
@@ -30,18 +30,24 @@ except ImportError:
|
|
|
|
|
|
def validate_inputs(config, args, unknown_args):
|
|
|
error_arr = []
|
|
|
+ banner_shown = False
|
|
|
try:
|
|
|
if args.configpath:
|
|
|
if os.path.isfile(args.configpath):
|
|
|
pil.config_path = args.configpath
|
|
|
else:
|
|
|
- if os.path.isfile(pil.config_path):
|
|
|
- logger.warn("Custom config path is invalid, falling back to default path: {:s}".format(pil.config_path))
|
|
|
- logger.separator()
|
|
|
- else: # Create new config if it doesn't exist
|
|
|
- logger.banner()
|
|
|
- helpers.new_config()
|
|
|
- return False
|
|
|
+ logger.banner()
|
|
|
+ banner_shown = True
|
|
|
+ logger.warn("Custom config path is invalid, falling back to default path: {:s}".format(pil.config_path))
|
|
|
+ pil.config_path = os.path.join(os.getcwd(), "pyinstalive.ini")
|
|
|
+ logger.separator()
|
|
|
+
|
|
|
+
|
|
|
+ if not os.path.isfile(pil.config_path): # Create new config if it doesn't exist
|
|
|
+ if not banner_shown:
|
|
|
+ logger.banner()
|
|
|
+ helpers.new_config()
|
|
|
+ return False
|
|
|
pil.config_path = os.path.realpath(pil.config_path)
|
|
|
config.read(pil.config_path)
|
|
|
|