-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-72979] Remove trailing space from Windows agent secret file instructions #9739
Conversation
…eation instructions in windows and unix
@@ -53,26 +53,26 @@ ${copy_java_cmd_secret_unix} | |||
${copy_agent_jar_windows} | |||
${copy_java_cmd_secret_windows} | |||
</pre> | |||
|
|||
<j:set var="copy_secret_to_file" value="echo ${it.jnlpMac} > secret-file" /> | |||
<j:set var="copy_secret_to_file_windows" value="echo ${it.jnlpMac}> secret-file" /> |
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 worried that, if ${it.jnlpMac}
ends with a digit, then cmd.exe
might treat that as part of a file descriptor redirection operator, like 2>
to redirect standard error. But apparently cmd.exe
doesn't do that if there are other printable characters adjacent to the last digit. And ${it.jnlpMac}
is a hexadecimal number that doesn't contain spaces, so it's OK.
Can this PR be merged under hacktoberfest? |
As far as I know, Hacktoberfest does not recognize merged pull requests that were submitted before 1 Oct 2024. |
Okay then ig I will try and find some hacktoberfest issues |
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.
/label ready-for-merge
This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!
See JENKINS-72979.
Testing done
Confirmed with interactive testing that when the space precedes the ">" character on Windows 11 cmd.exe, the output file includes a trailing space. Confirmed with interactive testing that when space that precedes the ">" character is removed, the output file does not include a trailing space.
No automated test because the text is an example command.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@NotMyFault
Before the changes are marked as
ready-for-merge
:Maintainer checklist