mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
small improvement to config_file
This commit is contained in:
parent
f45d81be11
commit
6340db1076
1 changed files with 5 additions and 4 deletions
|
@ -191,14 +191,15 @@ def get_configuration(args):
|
|||
# ensure __config_file__ always exists
|
||||
if args.config_file is not None:
|
||||
if not os.path.exists(args.config_file):
|
||||
print("There is no configuration file detected.")
|
||||
print(f"Copy default configuration file to {args.config_file}.")
|
||||
print(f"Can't find {args.config_file}.")
|
||||
if sys.platform == 'win32':
|
||||
print(f"Copying default configuration file to {args.config_file}...")
|
||||
os.system(f"copy default_config.yml {args.config_file}")
|
||||
elif sys.platform == 'linux2':
|
||||
elif sys.platform in ["linux2", "darwin"]:
|
||||
print(f"Copying default configuration file to {args.config_file}...")
|
||||
os.system(f"cp default_config.yml {args.config_file}")
|
||||
else:
|
||||
print("Please create the file manually.")
|
||||
print("Please create the configuration file manually.")
|
||||
print("Read configuration from default_config.yml.")
|
||||
else:
|
||||
__config_file__ = args.config_file
|
||||
|
|
Loading…
Add table
Reference in a new issue