Skip to content

Commit 6f15ab2

Browse files
zosrothkohboutemy
authored andcommitted
Add public String[] getRawCommandline() to avoid OS dependency code in
unit tests
1 parent d38c467 commit 6f15ab2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/org/codehaus/plexus/util/cli/Commandline.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,15 @@ public String[] getCommandline()
488488
return getShellCommandline();
489489
}
490490

491+
return getRawCommandline();
492+
}
493+
494+
/**
495+
* Returns the executable and all defined arguments.<br>
496+
*
497+
*/
498+
public String[] getRawCommandline()
499+
{
491500
final String[] args = getArguments();
492501
String executable = getLiteralExecutable();
493502

@@ -501,7 +510,7 @@ public String[] getCommandline()
501510
return result;
502511
}
503512

504-
/**
513+
/**
505514
* Returns the shell, executable and all defined arguments. Shell usage is only desirable when generating code for
506515
* remote execution.
507516
*/

0 commit comments

Comments
 (0)