only enable linenoise for -d:nimUseLinenoise (#13478)

* only enable linenoise for -d:nimUseLinenoise

* fixup
This commit is contained in:
Timothee Cour 2020-02-24 02:06:39 -08:00 • committed by GitHub
commit 1cf5c280e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 9 deletions

View file

@ -12,8 +12,10 @@
import
pathutils
template imp(x) = import x
const hasRstdin = compiles(imp(rdstdin))
# support `useGnuReadline`, `useLinenoise` for backwards compatibility
const hasRstdin = (defined(nimUseLinenoise) or defined(useLinenoise) or defined(useGnuReadline)) and
not defined(windows)
when hasRstdin: import rdstdin
type