Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

debayangg
Copy link
Contributor

@debayangg debayangg commented Sep 17, 2024

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

  • Remove trailing space from Windows agent secret file instructions.

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@NotMyFault

Before the changes are marked as ready-for-merge:

Maintainer checklist

@@ -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} &gt; secret-file" />
<j:set var="copy_secret_to_file_windows" value="echo ${it.jnlpMac}&gt; secret-file" />
Copy link

@KalleOlaviNiemitalo KalleOlaviNiemitalo Sep 17, 2024

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.

@MarkEWaite MarkEWaite changed the title [JENKINS-72979] Removed extra space in Windows agent secret file instructions [JENKINS-72979] Remove trailing space character from Windows agent secret file instructions Sep 21, 2024
@MarkEWaite MarkEWaite changed the title [JENKINS-72979] Remove trailing space character from Windows agent secret file instructions [JENKINS-72979] Remove trailing space from Windows agent secret file instructions Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants