Skip to content

Specify /D for cmd.exe to bypass the Command Processor Autorun folder #272

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

sebthom
Copy link
Contributor

@sebthom sebthom commented Sep 18, 2024

With this PR I am trying to address the issue I reported at https://issues.apache.org/jira/browse/MJAVADOC-811

In corporate environments system admins may have configured a default directory for newly spawned cmd.exe processes which results in javadoc being executed in the wrong folder/wrong drive. By specifying the /D flag the cmd.exe will always execute the given command in the current working directory as expected.

The surprising AutoRun behavior is explained in Microsoft's devblog: Hidden gotcha: The command processor's AutoRun setting

@sebthom
Copy link
Contributor Author

sebthom commented Sep 19, 2024

... I don't know how it is used ...

maven-javadoc-plugin uses org.codehaus.plexus.util.cli.Commandline.Commandline, see https://github.com/apache/maven-javadoc-plugin/blob/ff52cff81fa6141fd2fc51f51618363e2a08f36a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L1948

which in turn uses org.codehaus.plexus.util.cli.shell.CmdShell.CmdShell()

@michael-o michael-o self-assigned this Sep 23, 2024
@michael-o
Copy link
Member

Will do the handling and release.

@michael-o michael-o merged commit 9093271 into codehaus-plexus:master Sep 23, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants