all repos — py-vite @ 34355135c013ba0e00442903b9c3e35aef2824a9

the original vite, written in python

feat: display path error
icyphox icyph0x@protonmail.com
Fri, 16 Mar 2018 09:31:19 +0530
commit

34355135c013ba0e00442903b9c3e35aef2824a9

parent

21dde9f4a1adc9bcb62c8418b824e72504d2bd34

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M vite.pyvite.py

@@ -21,11 +21,12 @@ project_path = args.path[0]

def create_dirs(path): try: + abs_path = pathlib.Path(path).resolve() pathlib.Path(path + '/pages').mkdir(parents=True, exist_ok=False) pathlib.Path(path + '/build').mkdir(exist_ok=False) + print('Created project directory at %s.' % (abs_path)) except FileExistsError as e: - if e.errno != errno.EEXIST: - raise + print('Error: specified path exists.') def main(): create_dirs(project_path)