mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Changed: Add label parameter to ExecutionCommand
getArgumentsLogString()
and getArgumentsMarkdownString()
functions for external usage
This commit is contained in:
@@ -472,7 +472,7 @@ public class ExecutionCommand {
|
||||
markdownString.append("\n").append(MarkdownUtils.getSingleLineMarkdownStringEntry("Current State", executionCommand.currentState.getName(), "-"));
|
||||
|
||||
markdownString.append("\n").append(MarkdownUtils.getSingleLineMarkdownStringEntry("Executable", executionCommand.executable, "-"));
|
||||
markdownString.append("\n").append(getArgumentsMarkdownString(executionCommand.arguments));
|
||||
markdownString.append("\n").append(getArgumentsMarkdownString("Arguments", executionCommand.arguments));
|
||||
markdownString.append("\n").append(MarkdownUtils.getSingleLineMarkdownStringEntry("Working Directory", executionCommand.workingDirectory, "-"));
|
||||
markdownString.append("\n").append(MarkdownUtils.getSingleLineMarkdownStringEntry("Runner", executionCommand.runner, "-"));
|
||||
markdownString.append("\n").append(MarkdownUtils.getSingleLineMarkdownStringEntry("isFailsafe", executionCommand.isFailsafe, "-"));
|
||||
@@ -547,7 +547,7 @@ public class ExecutionCommand {
|
||||
}
|
||||
|
||||
public String getArgumentsLogString() {
|
||||
return getArgumentsLogString(arguments);
|
||||
return getArgumentsLogString("Arguments", arguments);
|
||||
}
|
||||
|
||||
public String getWorkingDirectoryLogString() {
|
||||
@@ -623,8 +623,8 @@ public class ExecutionCommand {
|
||||
* @param argumentsArray The {@link String[]} argumentsArray to convert.
|
||||
* @return Returns the log friendly {@link String}.
|
||||
*/
|
||||
public static String getArgumentsLogString(final String[] argumentsArray) {
|
||||
StringBuilder argumentsString = new StringBuilder("Arguments:");
|
||||
public static String getArgumentsLogString(String label, final String[] argumentsArray) {
|
||||
StringBuilder argumentsString = new StringBuilder(label + ":");
|
||||
|
||||
if (argumentsArray != null && argumentsArray.length != 0) {
|
||||
argumentsString.append("\n```\n");
|
||||
@@ -660,8 +660,8 @@ public class ExecutionCommand {
|
||||
* @param argumentsArray The {@link String[]} argumentsArray to convert.
|
||||
* @return Returns the markdown {@link String}.
|
||||
*/
|
||||
public static String getArgumentsMarkdownString(final String[] argumentsArray) {
|
||||
StringBuilder argumentsString = new StringBuilder("**Arguments:**");
|
||||
public static String getArgumentsMarkdownString(String label, final String[] argumentsArray) {
|
||||
StringBuilder argumentsString = new StringBuilder("**" + label + ":**");
|
||||
|
||||
if (argumentsArray != null && argumentsArray.length != 0) {
|
||||
argumentsString.append("\n");
|
||||
|
Reference in New Issue
Block a user