You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When spaces are in the folder, and the allure:report is ran, the generated report path is quoted, but writing to the disk with an actual " for the first folder.
To Reproduce
Steps to reproduce the behavior:
Create a parent folder with space
Check out source into folder with space
Run allure report generation (ie mvn allure:report)
View workspace, there will be a folder named "/
Expected behavior
Folder should resolve without quotes, in this example it would go in target folder instead of creating "/workspace path/source/target/allure-results"
Screenshots
Environment (please complete the following information):
Allure version
2.13.1 and higher
Test framework
testng@6.8
Allure adaptor
allure-testng@2.13.1
Generate report using
allure-maven@2.10
Additional context
Versions 2.13.0 and below are not affected with this issue.
The text was updated successfully, but these errors were encountered:
Hello - I've run into this issue myself and did some investigation.
From what I can tell, this is actually an issue with the allure-maven repo. However, the problem didn't surface until the allure2 update from 2.13.0 to 2.13.1.
In that update, the JCommander dep went from version 2.72 to 2.78, which included a correction to their handling of quoted named parameters. In prior versions, named parameters were trimmed of surrounding double quotes, but this is no longer the case.
How this relates back to allure-maven is with the use of Apache's CommandLine in Commons Exec. This project has a longstanding bug, which causes added arguments that contain any spaces within it, to be surrounded with literal double quotes and passed through to the command launcher as such. This only occurs when the "handleQuote" flag is set, which is enabled by default. This is done in a few places within allure-maven, but in particular here.
So for the path mentioned in this issue: /workspace path/source/target/allure-results
The mvn plugin would add this as an argument to the allure binary with the handleQuotes option set, causing it to be passed through as "/workspace path/source/target/allure-results" with literal quotes in the string and further processed by allure with JCommander, which no longer trims it.
A simple solution to this that I could think would be to pass false to the "handleQuotes" option in the allure-maven project when adding arguments to CommandLine and it doesn't seem to have any negative side effects. I did a quick check on unix-like and windows systems, with and without spaces, and it seems to work. Although, I'm not so sure about some more potentially obscure paths.
Describe the bug
When spaces are in the folder, and the allure:report is ran, the generated report path is quoted, but writing to the disk with an actual " for the first folder.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Folder should resolve without quotes, in this example it would go in target folder instead of creating "/workspace path/source/target/allure-results"
Screenshots
![image](https://user-images.githubusercontent.com/16257886/118321373-1d696180-b4c3-11eb-8493-f6e4e2df6ded.png)
Environment (please complete the following information):
Additional context
Versions 2.13.0 and below are not affected with this issue.
The text was updated successfully, but these errors were encountered: