forked from cadence/breezewiki
Look for paths relative to source files
This commit is contained in:
parent
8c65b2ed02
commit
73a5cb68c5
2 changed files with 8 additions and 2 deletions
|
@ -1,8 +1,11 @@
|
|||
#lang racket/base
|
||||
(require racket/runtime-path)
|
||||
|
||||
(provide
|
||||
config-get)
|
||||
|
||||
(define-runtime-path path-config "../config.txt")
|
||||
|
||||
(define (config-get key)
|
||||
(hash-ref config key))
|
||||
|
||||
|
@ -18,7 +21,7 @@
|
|||
default-config
|
||||
(with-handlers ([exn:fail:filesystem:errno? (λ (exn)
|
||||
'())])
|
||||
(call-with-input-file "../config.txt"
|
||||
(call-with-input-file path-config
|
||||
(λ (in)
|
||||
(let loop ([alist '()])
|
||||
(let ([key (read in)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue