Skip to content
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

The sample from the front page fails #4

Open
retorquere opened this issue Dec 29, 2023 · 0 comments
Open

The sample from the front page fails #4

retorquere opened this issue Dec 29, 2023 · 0 comments

Comments

@retorquere
Copy link

this script

require "config"

config = Config.parse("username: chris, link: https://github.com/chris-huxtable/config.cr")

username = config.as_s("username")
link = config.as_a("link")

fails with the message

Unhandled exception: Cast from String to Array(T) failed, at /Users/emile/github/unicode2latex/lib/config/src/config/any.cr:223:10:223 (TypeCastError)
  from lib/config/src/config/any.cr:223:10 in 'as_a'
  from lib/config/src/config/any.cr:240:10 in 'as_a'
  from tt.cr:6:1 in '__crystal_main'
  from /opt/homebrew/Cellar/crystal/1.10.1/share/crystal/src/crystal/main.cr:129:5 in 'main_user_code'
  from /opt/homebrew/Cellar/crystal/1.10.1/share/crystal/src/crystal/main.cr:115:7 in 'main'
  from /opt/homebrew/Cellar/crystal/1.10.1/share/crystal/src/crystal/main.cr:141:3 in 'main'

using Crystal 1.10.1 (2023-10-13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant