gitclone: if directory is no longer present, install, never update.

parent d27df419
......@@ -145,6 +145,10 @@ class Recipe(object):
raise UserError('revision and branch (other than master) parameters '
'are set but are incompatible. Please specify only one of them.')
# Check existence of directory
if not os.path.exists(self.location):
self.update = self.install
def gitReset(self, revision=None):
"""Operates git reset on the repository."""
command = [self.git_command, 'reset', '--hard']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment