Skip to content

Commit 10bcbe8

Browse files
authored
Merge pull request #62 from fowlmouth/new-nim-compat
New nim compat
2 parents e08257e + e38a057 commit 10bcbe8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

nake.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ else:
8282
break
8383
else: discard
8484
# If the user specified a task but it doesn't exist, abort.
85-
let badTask = (not task.isNil and (not tasks.hasKey(task)))
86-
if task.isNil and tasks.hasKey(defaultTask):
85+
let badTask = (task.len != 0 and (not tasks.hasKey(task)))
86+
if task.len == 0 and tasks.hasKey(defaultTask):
8787
echo "No task specified, running default task defined by nakefile."
8888
task = defaultTask
89-
if printTaskList or task.isNil or badTask:
89+
if printTaskList or task.len == 0 or badTask:
9090
if badTask: echo "Task '" & task & "' not found."
9191
listTasks()
9292
quit(if badTask: 1 else: 0)

nake.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "1.9.2"
1+
version = "1.9.3"
22
author = "fowl"
33
description = "make-like for Nim. Describe your builds as tasks!"
44
license = "MIT"

nakefile.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ proc switchToGhPages(iniPathOrDir = ".") =
103103
## **This is a potentially destructive action!**. Pass the directory where
104104
## the ``gh_nimrod_doc_pages.ini`` file lives, or the path to the specific
105105
## file if you renamed it.
106-
assert(not iniPathOrDir.isNil)
106+
assert(iniPathOrDir.len != 0)
107107
let
108108
ghExe = findExe("gh_nimrod_doc_pages")
109109
gitExe = findExe("git")

nakelib.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ proc askSilentShellCMD(cmd: string):
8787
##
8888
## In case of the user rejecting the command the proc will return the empty
8989
## string for `output` and a negative value for `exitCode`.
90-
assert(not cmd.isNil)
90+
assert(cmd.len != 0)
9191

9292
if validateShellCommands:
9393
let ans = readLineFromSTDIN("Run? `$#` [N/y]\L" % cmd)
@@ -144,7 +144,7 @@ proc silentShell*(info: string, cmd: varargs[string, `$`]): bool {.discardable,
144144
## let another = silentShell("Checking for B", "cmdB", "-v")
145145
## if not another:
146146
## quit("Sorry, neither A nor B were found, please install one")
147-
if not info.isNil:
147+
if info.len != 0:
148148
echo info
149149
let (output, exitCode) = askSilentShellCMD(cmd.join(" "))
150150
result = (0 == exitCode)

0 commit comments

Comments
 (0)