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

Add public String[] getRawCommandline() to avoid OS dependency code in unit tests #68

Merged
merged 1 commit into from Sep 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/main/java/org/codehaus/plexus/util/cli/Commandline.java
Expand Up @@ -488,6 +488,15 @@ public String[] getCommandline()
return getShellCommandline();
}

return getRawCommandline();
}

/**
* Returns the executable and all defined arguments.<br>
*
*/
public String[] getRawCommandline()
{
final String[] args = getArguments();
String executable = getLiteralExecutable();

Expand All @@ -501,7 +510,7 @@ public String[] getCommandline()
return result;
}

/**
/**
* Returns the shell, executable and all defined arguments. Shell usage is only desirable when generating code for
* remote execution.
*/
Expand Down