Strip trailing "\" characters in CMD_FLAGS.txt

This commit is contained in:
oobabooga 2023-11-16 09:33:36 -08:00
parent 58c6001be9
commit cbf2b47476

View file

@ -20,7 +20,7 @@ conda_env_path = os.path.join(script_dir, "installer_files", "env")
cmd_flags_path = os.path.join(script_dir, "CMD_FLAGS.txt")
if os.path.exists(cmd_flags_path):
with open(cmd_flags_path, 'r') as f:
CMD_FLAGS = ' '.join(line.strip() for line in f if line.strip() and not line.strip().startswith('#'))
CMD_FLAGS = ' '.join(line.strip().rstrip('\\').strip() for line in f if line.strip().rstrip('\\').strip() and not line.strip().startswith('#'))
else:
CMD_FLAGS = ''