Folder already exists error shouldn't include stack trace.
Rather than:
$ nnd engine-tools create-new tutorial
┌─ Nom Nom Data CLI ──────────────────────────────────────────────────────────┐
│ Version │ 0.1.5 │
│ Directory │ C:\Data\Work\NND\engine-code\test-root │
│ Platform │ win32 │
│ Python │ 3.7.4 │
│ Plugins │ nomnomdata-tools-engine-0.14.1 nomnomdata-engine-0.5.5 │
│ │ nomnomdata-auth-2.2.3 │
└─────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
File "c:\apps\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\apps\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Apps\Python37\Scripts\nnd.exe\__main__.py", line 7, in <module>
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\jrs\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\apps\python37\lib\site-packages\nomnomdata\tools\engine\create_new.py", line 27, in create_new
shutil.copytree(t_dir, engine_name, ignore=ignore, copy_function=copymap)
File "c:\apps\python37\lib\shutil.py", line 324, in copytree
os.makedirs(dst)
File "c:\apps\python37\lib\os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'tutorial'
Just a "Cannot create XXXXX. Folder or file already exists." message with no stack trace would be more user friendly.
Edited by Josh Sherman