[fix][cli] Pulsar shell: allow absolute config file - #18805
Merged
Conversation
tisonkun
approved these changes
Dec 9, 2022
tisonkun
left a comment
Member
There was a problem hiding this comment.
Since the baseDir is fixed in our case, I'd prefer:
static File resolveLocalFile(String input) {
final File file = new File(input);
if (!file.isAbsolute()) {
return new File(LOCAL_FILES_BASE_DIR, input);
}
return file;
}But it's a style preference, so not a blocker to merge this patch.
+1
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18805 +/- ##
============================================
- Coverage 50.05% 47.41% -2.65%
+ Complexity 11024 10581 -443
============================================
Files 703 703
Lines 68814 68814
Branches 7378 7378
============================================
- Hits 34446 32629 -1817
- Misses 30621 32511 +1890
+ Partials 3747 3674 -73
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
RobertIndie
approved these changes
Dec 12, 2022
nicoloboschi
added a commit
to datastax/pulsar
that referenced
this pull request
Dec 13, 2022
(cherry picked from commit 1df65b9)
Demogorgon314
pushed a commit
to Demogorgon314/pulsar
that referenced
this pull request
Dec 26, 2022
Demogorgon314
pushed a commit
to Demogorgon314/pulsar
that referenced
this pull request
Dec 29, 2022
lifepuzzlefun
pushed a commit
to lifepuzzlefun/pulsar
that referenced
this pull request
Jan 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When creating a config with the
--fileoption, absolute paths are not allowed.Modifications
Documentation
docdoc-requireddoc-not-neededdoc-complete