Update to address changes for Nim 1.x (currently 1.4.0).

This commit is contained in:
Jonathan Bernard 2020-11-12 04:05:04 -06:00
parent 4af0d09356
commit ef16eafd48
3 changed files with 9 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# Package # Package
version = "4.9.3" version = "4.9.4"
author = "Jonathan Bernard" author = "Jonathan Bernard"
description = "Personal issue tracker." description = "Personal issue tracker."
license = "MIT" license = "MIT"
@ -10,9 +10,9 @@ bin = @["pit", "pit_api"]
# Dependencies # Dependencies
requires @[ requires @[
"nim >= 0.19.0", "nim >= 1.4.0",
"docopt 0.6.8", "docopt 0.6.8",
"jester 0.4.1", "jester 0.5.0",
"uuids 0.1.10", "uuids 0.1.10",
"https://git.jdb-labs.com/jdb/nim-cli-utils.git >= 0.6.4", "https://git.jdb-labs.com/jdb/nim-cli-utils.git >= 0.6.4",

View File

@ -266,9 +266,9 @@ proc loadConfig*(args: Table[string, Value] = initTable[string, Value]()): PitCo
".pitrc", $getEnv("PITRC"), $getEnv("HOME") & "/.pitrc"] ".pitrc", $getEnv("PITRC"), $getEnv("HOME") & "/.pitrc"]
var pitrcFilename: string = var pitrcFilename: string =
foldl(pitrcLocations, if len(a) > 0: a elif existsFile(b): b else: "") foldl(pitrcLocations, if len(a) > 0: a elif fileExists(b): b else: "")
if not existsFile(pitrcFilename): if not fileExists(pitrcFilename):
warn "pit: could not find .pitrc file: " & pitrcFilename warn "pit: could not find .pitrc file: " & pitrcFilename
if isEmptyOrWhitespace(pitrcFilename): if isEmptyOrWhitespace(pitrcFilename):
pitrcFilename = $getEnv("HOME") & "/.pitrc" pitrcFilename = $getEnv("HOME") & "/.pitrc"
@ -299,12 +299,10 @@ proc loadConfig*(args: Table[string, Value] = initTable[string, Value]()): PitCo
if isEmptyOrWhitespace(result.tasksDir): if isEmptyOrWhitespace(result.tasksDir):
raise newException(Exception, "no tasks directory configured") raise newException(Exception, "no tasks directory configured")
if not existsDir(result.tasksDir): if not dirExists(result.tasksDir):
raise newException(Exception, "cannot find tasks dir: " & result.tasksDir) raise newException(Exception, "cannot find tasks dir: " & result.tasksDir)
# Create our tasks directory structure if needed # Create our tasks directory structure if needed
for s in IssueState: for s in IssueState:
if not existsDir(result.tasksDir / $s): if not dirExists(result.tasksDir / $s):
(result.tasksDir / $s).createDir (result.tasksDir / $s).createDir

View File

@ -1 +1 @@
const PIT_VERSION* = "4.9.3" const PIT_VERSION* = "4.9.4"