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

cannot put StripQueryExcludes into config file #143

Closed
slawo-ch opened this issue Feb 10, 2020 · 3 comments
Closed

cannot put StripQueryExcludes into config file #143

slawo-ch opened this issue Feb 10, 2020 · 3 comments
Labels

Comments

@slawo-ch
Copy link

Describe the bug

Create a file .htmltest.yml containing

StripQueryExcludes: [
  "https://marketplace.visualstudio.com"
]

Running htmltest it seems that it fails to understand the file:

$ htmltest 
htmltest started at 01:20:19 on <nil>
========================================================================
panic: reflect.Set: value of type []interface {} is not assignable to type []string

goroutine 1 [running]:
reflect.Value.assignTo(0x131b960, 0xc00000d620, 0x97, 0x139ef83, 0xb, 0x131cce0, 0x0, 0x135c6c0, 0xccf1d99aede24742, 0x17)
        /home/travis/.gimme/versions/go1.13.6.linux.amd64/src/reflect/value.go:2403 +0x432
reflect.Value.Set(0x131cce0, 0xc0000d27a0, 0x197, 0x131b960, 0xc00000d620, 0x97)
        /home/travis/.gimme/versions/go1.13.6.linux.amd64/src/reflect/value.go:1537 +0xbd
github.com/imdario/mergo.deepMerge(0x131cce0, 0xc0000d27a0, 0x197, 0x131b960, 0xc00000d620, 0x97, 0xc000101720, 0x1, 0xc00000d700, 0x0, ...)
        /home/travis/gopath/pkg/mod/github.com/imdario/mergo@v0.3.8/merge.go:165 +0x26cd
github.com/imdario/mergo.deepMap(0x1398640, 0xc0000d26c0, 0x199, 0x1332560, 0xc000081a40, 0x15, 0xc000101720, 0x0, 0xc00000d700, 0x15, ...)
        /home/travis/gopath/pkg/mod/github.com/imdario/mergo@v0.3.8/map.go:102 +0x84f
github.com/imdario/mergo._map(0x1335200, 0xc0000d26c0, 0x1332560, 0xc000081a40, 0xc00000e3d8, 0x1, 0x1, 0x1, 0x0)
        /home/travis/gopath/pkg/mod/github.com/imdario/mergo@v0.3.8/map.go:174 +0x204
github.com/imdario/mergo.MapWithOverwrite(...)
        /home/travis/gopath/pkg/mod/github.com/imdario/mergo@v0.3.8/map.go:140
github.com/wjdp/htmltest/htmltest.(*HTMLTest).setOptions(0xc0000d26c0, 0xc000081980)
        /home/travis/gopath/src/github.com/wjdp/htmltest/htmltest/options.go:150 +0x1ed
github.com/wjdp/htmltest/htmltest.Test(0xc000081980, 0xc00000e018, 0xc000101d48, 0x1)
        /home/travis/gopath/src/github.com/wjdp/htmltest/htmltest/htmltest.go:47 +0xae
main.run(0xc000081980, 0xc000081980)
        /home/travis/gopath/src/github.com/wjdp/htmltest/main.go:159 +0x207
main.main()
        /home/travis/gopath/src/github.com/wjdp/htmltest/main.go:66 +0x268

I tried placing just the domain name into the list, but I get the same error every time. no matter what I put into StripQueryExcludes.

Interestingly, even the empty list StripQueryExcludes: [] fails.

Versions

  • Mac OS X Mojave 10.14.6
  • htmltest: 0.12.1
@slawo-ch slawo-ch added the bug label Feb 10, 2020
@wjdp
Copy link
Owner

wjdp commented Feb 10, 2020

This feels like yaml parsing into the wrong type and us not catching the exception.

Please try

StripQueryExcludes:
  - https://website.com

@slawo-ch
Copy link
Author

Was my first guess too and one of the first things I tried, same result.

@wjdp
Copy link
Owner

wjdp commented Jan 16, 2021

Fixed in 3c05eff

@wjdp wjdp closed this as completed Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants