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

c8rc extends attribute with relative path not working as expected #504

Open
dawsonp-zwickroell opened this issue Nov 27, 2023 · 0 comments

Comments

@dawsonp-zwickroell
Copy link

Version: v18.18.0
Platform: WIn 11 22H2
c8 Version: 8.0.1

I think I found a bug with c8rc using cascaded c8rc configurations. I figured out I could use the "extends" attribute in the .c8rc config to merge configs. I want to merge configs because we use c8 in a monorepo structure.
It seems that the relative path is resolved based on the working directory of the call instead of the file location of .c8rc.json file. I have build a small demo repository here:
https://github.com/dawsonp-zwickroell/c8rc-extends-problem

Steps to reproduce:

  • Checkout
  • yarn install
  • Change workdir to libs/sub-libs/lib1
  • Run yarn run coverage

The output on the terminal produces the following error:
ENOENT: no such file or directory, open 'C:\dev\c8rc-extends-problem\libs.c8rc.json'

I suppose this happens because the value of extends is "../../.c8rc.json" but is not evaluated from "libs/sub-libs" but from "libs/sub-libs/lib1"

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