-
-
Notifications
You must be signed in to change notification settings - Fork 158
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: file exporter path handling #2498
fix: file exporter path handling #2498
Conversation
✅ Deploy Preview for go-feature-flag-doc-preview canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2498 +/- ##
==========================================
- Coverage 86.48% 86.31% -0.18%
==========================================
Files 100 100
Lines 3544 3551 +7
==========================================
Hits 3065 3065
- Misses 352 355 +3
- Partials 127 131 +4 ☔ View full report in Codecov by Sentry. |
To edit docs, besides changing the content of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoangnv-bkhn Thanks for your pull request, this makes the file exporter way better than it was before 🙇.
I have added a test in the case we have no outputDir
.
Everything else is really great.
I will merge it soon and it will be available in the next release.
|
||
var filePath string | ||
if outputDir == "" { | ||
filePath = filename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a test case for when we have no outputDir
.
e45c3f2
to
d73b90c
Compare
Oh sorry I forgot to address this one. In the preview for this PR it will be in https://deploy-preview-2498--go-feature-flag-doc-preview.netlify.app/docs/next |
|
Description
Problem:
OutputDir
in file exporter does not accept non-existent path.-> This will result in a
permission denied
error.OutputDir
should end with/
.However, the current implementation makes the path look like
{OutputDir}//{file-name}.json
, resulting in a redundant/
.The way it was resolved:
Check the validity of OutputDir and create if necessary
How to test the change:
Configure OutputDir with cases: path does not exist, path with trailing /, path is empty string, and observe the results
Closes issue(s)
Resolve #2483
Checklist
README.md
and/website/docs
)