-
Notifications
You must be signed in to change notification settings - Fork 181
Quote filenames written in shell scripts #997
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,7 +102,7 @@ public Optional<String> option() { | |
| */ | ||
| @Override | ||
| public String[] option(Iterable<? extends Path> paths) { | ||
| var joiner = new StringJoiner(File.pathSeparator, (moduleName != null) ? moduleName + "=\"" : "\"", "\""); | ||
| var joiner = new StringJoiner(File.pathSeparator, (moduleName != null) ? moduleName + '=' : "", ""); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here the quotes only got removed, but not replaced. Is this correct?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it needs to be consistent with apache/maven#11435. |
||
| paths.forEach((path) -> joiner.add(path.toString())); | ||
| return new String[] {option().get(), joiner.toString()}; | ||
| } | ||
|
|
||
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
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.
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 don't get this comment in together with the if statement.
The comment says that dir should never be null, but it was observed, so I would assume the if handles the one path and an else path the rare, but observed, path if it is. But I don't see an else to handle this?
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.
basediris a field declared in this class as below:A value should always be injected by Maven core. But during the development of this plugin, sometime when upgrading from a Maven version to the next one, or when using a snapshot version compiled from
master, the value was not supplied anymore by Maven core. For example, a similar issue can be reproduced with apache/maven#11441 (I don't know if it was the same cause).Even if a null
basedirmay be an indication of a serious problem that we want to be aware of, in this particular context,basediris used only for making a path relative when creating a debug file. This code is executed only if the build failed (or was executed with--verbose), so we probably don't want the original cause to be hidden by aNullPointerExceptionwhile writing debug information.