diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2400,7 +2400,7 @@ class Project(object): | |||
2400 | os.path.relpath(stock_hook, os.path.dirname(dst)), dst) | 2400 | os.path.relpath(stock_hook, os.path.dirname(dst)), dst) |
2401 | except OSError as e: | 2401 | except OSError as e: |
2402 | if e.errno == errno.EPERM: | 2402 | if e.errno == errno.EPERM: |
2403 | raise GitError('filesystem must support symlinks') | 2403 | raise GitError(self._get_symlink_error_message()) |
2404 | else: | 2404 | else: |
2405 | raise | 2405 | raise |
2406 | 2406 | ||
@@ -2514,7 +2514,7 @@ class Project(object): | |||
2514 | 2514 | ||
2515 | except OSError as e: | 2515 | except OSError as e: |
2516 | if e.errno == errno.EPERM: | 2516 | if e.errno == errno.EPERM: |
2517 | raise DownloadError('filesystem must support symlinks') | 2517 | raise DownloadError(self._get_symlink_error_message()) |
2518 | else: | 2518 | else: |
2519 | raise | 2519 | raise |
2520 | 2520 | ||
@@ -2555,6 +2555,14 @@ class Project(object): | |||
2555 | platform_utils.rmtree(dotgit) | 2555 | platform_utils.rmtree(dotgit) |
2556 | raise | 2556 | raise |
2557 | 2557 | ||
2558 | def _get_symlink_error_message(self): | ||
2559 | if platform_utils.isWindows(): | ||
2560 | return ('Unable to create symbolic link. Please re-run the command as ' | ||
2561 | 'Administrator, or see ' | ||
2562 | 'https://github.com/git-for-windows/git/wiki/Symbolic-Links ' | ||
2563 | 'for other options.') | ||
2564 | return 'filesystem must support symlinks' | ||
2565 | |||
2558 | def _gitdir_path(self, path): | 2566 | def _gitdir_path(self, path): |
2559 | return platform_utils.realpath(os.path.join(self.gitdir, path)) | 2567 | return platform_utils.realpath(os.path.join(self.gitdir, path)) |
2560 | 2568 | ||