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

fix: search file path when no --config option #692

Closed
wants to merge 1 commit into from
Closed

fix: search file path when no --config option #692

wants to merge 1 commit into from

Conversation

guoyunhe
Copy link
Contributor

@guoyunhe guoyunhe commented Nov 14, 2022

Why am I submitting this PR

Fix my previous PR #673 which removed default value for --config option but didn't search for config files with lilconfig correctly.

Does it fix an existing ticket?

No

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • tests are included and pass: yarn test (see details here)
  • documentation is changed or added

Copy link
Member

@karellm karellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we've been at it at the same time and I've partially fixed it. See my comments.

result = await configReader.load(program.opts().config)
} else {
result = await configReader.search()
}
config = result.config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still possibly problematic as if there is no config file this will fail (result.config is then undefined). I've pushed a fix as 7.0.2

@@ -117,16 +123,19 @@ import i18nTransform from '../dist/transform.js'
}
}

let basePath = process.cwd()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make a PR with only that part of the code? I've missed that in my fix.

@karellm
Copy link
Member

karellm commented Nov 14, 2022

It is published as 7.0.3 Thanks for the PR

@karellm karellm closed this Nov 14, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants