Skip to content

Commit

Permalink
Fix bug with create link for missing path
Browse files Browse the repository at this point in the history
  • Loading branch information
chronoxor committed Oct 24, 2019
1 parent 69a5a28 commit c24c35d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Specify version format
version: "1.12.0.{build}"
version: "1.13.0.{build}"

# Image to use
image: Visual Studio 2019
Expand Down
9 changes: 6 additions & 3 deletions gil.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
__email__ = "chronoxor@gmail.com"
__license__ = "MIT License"
__url__ = "https://github.com/chronoxor/gil"
__version__ = "1.12.0.0"
__version__ = "1.13.0.0"


class GilRecord(object):
Expand Down Expand Up @@ -275,8 +275,11 @@ def create_link(src_path, dst_path):
else:
os.remove(dst_path)
# Create the link
os.symlink(src_path, dst_path, target_is_directory=True)
print("Update git link: %s -> %s" % (src_path, dst_path))
if os.path.exists(src_path):
os.symlink(src_path, dst_path, target_is_directory=True)
print("Create git link: %s -> %s" % (src_path, dst_path))
else:
print("Cannot create git link! Path not found: %s" % src_path)

@staticmethod
def update_link(src_path, dst_path):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
if __name__ == "__main__":
distutils.core.setup(
name="gil",
version="1.12.0.0",
version="1.13.0.0",
author="Ivan Shynkarenka",
author_email="chronoxor@gmail.com",
url="https://github.com/chronoxor/gil",
download_url = "https://github.com/chronoxor/gil/archive/1.12.0.0.tar.gz",
download_url = "https://github.com/chronoxor/gil/archive/1.13.0.0.tar.gz",
description="Gil (git links) tool",
long_description="Gil (git links) tool allows to describe and manage complex git repositories dependencies with cycles and cross references",
license="MIT License",
Expand Down

0 comments on commit c24c35d

Please sign in to comment.