From ef16eafd48ff209beab568019adf38ab1ec2bdd1 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Thu, 12 Nov 2020 04:05:04 -0600 Subject: [PATCH] Update to address changes for Nim 1.x (currently 1.4.0). --- pit.nimble | 8 ++++---- src/pitpkg/private/libpit.nim | 10 ++++------ src/pitpkg/version.nim | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pit.nimble b/pit.nimble index 7c97161..12df4b7 100644 --- a/pit.nimble +++ b/pit.nimble @@ -1,6 +1,6 @@ # Package -version = "4.9.3" +version = "4.9.4" author = "Jonathan Bernard" description = "Personal issue tracker." license = "MIT" @@ -10,9 +10,9 @@ bin = @["pit", "pit_api"] # Dependencies requires @[ - "nim >= 0.19.0", + "nim >= 1.4.0", "docopt 0.6.8", - "jester 0.4.1", + "jester 0.5.0", "uuids 0.1.10", "https://git.jdb-labs.com/jdb/nim-cli-utils.git >= 0.6.4", @@ -22,4 +22,4 @@ requires @[ ] task updateVersion, "Update the version of this package.": - exec "update_nim_package_version pit 'src/pitpkg/version.nim'" \ No newline at end of file + exec "update_nim_package_version pit 'src/pitpkg/version.nim'" diff --git a/src/pitpkg/private/libpit.nim b/src/pitpkg/private/libpit.nim index 2f79285..61ecd3b 100644 --- a/src/pitpkg/private/libpit.nim +++ b/src/pitpkg/private/libpit.nim @@ -266,9 +266,9 @@ proc loadConfig*(args: Table[string, Value] = initTable[string, Value]()): PitCo ".pitrc", $getEnv("PITRC"), $getEnv("HOME") & "/.pitrc"] 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 if isEmptyOrWhitespace(pitrcFilename): pitrcFilename = $getEnv("HOME") & "/.pitrc" @@ -299,12 +299,10 @@ proc loadConfig*(args: Table[string, Value] = initTable[string, Value]()): PitCo if isEmptyOrWhitespace(result.tasksDir): 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) # Create our tasks directory structure if needed for s in IssueState: - if not existsDir(result.tasksDir / $s): + if not dirExists(result.tasksDir / $s): (result.tasksDir / $s).createDir - - diff --git a/src/pitpkg/version.nim b/src/pitpkg/version.nim index 2519449..a76a5fc 100644 --- a/src/pitpkg/version.nim +++ b/src/pitpkg/version.nim @@ -1 +1 @@ -const PIT_VERSION* = "4.9.3" \ No newline at end of file +const PIT_VERSION* = "4.9.4" \ No newline at end of file