Commit 7079b4ca authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Add logDebug

Fix a logic bug of pullProjectAll
parent 969f1919
......@@ -129,10 +129,11 @@ proc pullProjectAll(config: ProgConf) =
if kind == pcDir:
project.path = path
project.name = path.splitPath.tail
if gbpPull(config.uscanPath, project.path, stderr) != 0:
project.log.logErr(project.name, "Error while pulling", stderr)
else:
project.log.logInfo(project.name, "Pulled successfully.")
project.log.logDebug(project.name, "Pulling at " & project.path)
if gbpPull(config.uscanPath, project.path, stderr) != 0:
project.log.logErr(project.name, "Error while pulling", stderr)
else:
project.log.logInfo(project.name, "Pulled successfully.")
proc pullProjectArr(config: ProgConf, projectArr: seq[string]) =
......@@ -148,6 +149,7 @@ proc pullProjectArr(config: ProgConf, projectArr: seq[string]) =
if not dirExists(project.path):
project.log.logErr(project.name, "Dir doesn't exist", "")
else:
project.log.logDebug(project.name, "Pulling at " & project.path)
if gbpPull(config.uscanPath, project.path, stderr) != 0:
project.log.logErr(project.name, "Error while pulling", stderr)
else:
......@@ -174,6 +176,7 @@ proc cloneProject*(projects: seq[string]) =
if dirExists(project.path):
project.log.logErr(project.name, "Dir exists", "")
else:
project.log.logDebug(project.name, "Cloning to " & project.path)
if gbpClone(config.gbpPath, config.gitUrl, project.name, config.rootPath, stderr) != 0:
project.log.logErr(project.name, "Error while cloning", stderr)
else:
......
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