mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
f8e3247113
Includes new dependency packages: - nimPackages.python: 1.2 - nimPackages.rocksdb: 0.2.0 - nimPackages.snappy: 0.1.0 - nimPackages.spryvm: 0.9.3 - nimPackages.stew: 0.1.0 - nimPackages.tempfile: 0.1.7 - nimPackages.ui: 0.9.4
35 lines
979 B
Diff
35 lines
979 B
Diff
diff --git a/src/ispry.nim b/src/ispry.nim
|
|
index 23ad6c3..dc38a9d 100644
|
|
--- a/src/ispry.nim
|
|
+++ b/src/ispry.nim
|
|
@@ -134,8 +134,8 @@ proc main() =
|
|
#discard spry.setBinding(newEvalWord("@"), result)
|
|
var output = $result
|
|
# Print any result
|
|
- if output.isNil:
|
|
- output = if suspended: "nil" else: ""
|
|
+ if output == "" and suspended:
|
|
+ output = "nil"
|
|
stdout.write(output & "\n")
|
|
# except:
|
|
# echo "Oops, sorry about that: " & getCurrentExceptionMsg() & "\n"
|
|
diff --git a/src/spry.nim b/src/spry.nim
|
|
index 670a280..d81bb4c 100644
|
|
--- a/src/spry.nim
|
|
+++ b/src/spry.nim
|
|
@@ -87,13 +87,13 @@ for kind, key, val in getopt():
|
|
of cmdEnd: assert(false) # cannot happen
|
|
|
|
if eval:
|
|
- if filename == nil:
|
|
+ if filename == "":
|
|
writeHelp()
|
|
else:
|
|
code = filename
|
|
else:
|
|
code =
|
|
- if filename == nil:
|
|
+ if filename == "":
|
|
# no filename has been given, so we use stdin
|
|
readAll stdin
|
|
else:
|