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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebthom
Copy link

@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
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()

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.

4 participants