-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-numeric values are parsed as numbers #27
Comments
ah... interesting. thanks for reporting it. this is due to the non "EDN formatted thing": => (require '[clojure.edn :as edn])
=> (edn/read-string "7 Nov 22:44:53 2015")
7 also: boot.user=> (edn/read-string "7Nov 22:44:53 2015")
java.lang.NumberFormatException: Invalid number: 7Nov I was wondering for some time now whether to have an option param where it would treat/read/overwrite all ENV vars as strings for cases like this. If you have other ideas, let's talk :) |
other things to consider is to:
|
I was able to work around this by changing the parameters to be formatted I suppose wrapping the value in double quotes ( |
An option for disabling EDN parsing would be nice. I don't use that feature anyways. |
I added
[cprop]$ boot dev
=> (require '[cprop.source :as s])
=> (:foo (s/from-env))
"4242"
=> (:bar (s/from-env))
4242
=> (:date (s/from-env))
7
=> (:vec (s/from-env))
[1 2 3 4] but => (:foo (s/from-env {:as-is? true}))
"\"4242\""
=> (:bar (s/from-env {:as-is? true}))
"4242"
=> (:date (s/from-env {:as-is? true}))
"7 Nov 22:44:53 2015"
=> (:vec (s/from-env {:as-is? true}))
"[1 2 3 4]" it should be in |
also can be used at the top level: |
Thanks. |
great, thanks for the feedback. it is in |
Given an environment variable with the value
7 Nov 22:44:53 2015
, thencprop.source/read-system-env
accidentally parses it as the number7
instead of keeping it as a string.The text was updated successfully, but these errors were encountered: