about summary refs log tree commit diff stats
path: root/src/config/chapath.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-21 17:37:11 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-21 17:42:30 +0100
commitbdd482b0451f949870480d6d35be52953c08531a (patch)
treef534f6ff6655fa1675dc86d89e60c9b16631e928 /src/config/chapath.nim
parent71af803e1696cd87177ca3e9b16778288b75c69b (diff)
downloadchawan-bdd482b0451f949870480d6d35be52953c08531a.tar.gz
main: refactor slightly
* put forkServer into main()
* use a ctx type instead of closures
* get rid of types/opt import
Diffstat (limited to 'src/config/chapath.nim')
-rw-r--r--src/config/chapath.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/chapath.nim b/src/config/chapath.nim
index c27df1e9..57a8a853 100644
--- a/src/config/chapath.nim
+++ b/src/config/chapath.nim
@@ -290,3 +290,6 @@ proc fromJSChaPath*(ctx: JSContext; val: JSValue): JSResult[ChaPath] =
 proc unquote*(p: ChaPath): ChaPathResult[string] =
   let s = ?unquote(string(p))
   return ok(normalizedPath(s))
+
+proc unquoteGet*(p: ChaPath): string =
+  return p.unquote().get