Skip to content

Commit

Permalink
Add public String[] getRawCommandline() to avoid OS dependency code in
Browse files Browse the repository at this point in the history
unit tests
  • Loading branch information
zosrothko authored and hboutemy committed Sep 28, 2019
1 parent d38c467 commit 6f15ab2
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit 6f15ab2

Please sign in to comment.