From 8da78795d7383a2416426257d9c1b4efc4e223ca Mon Sep 17 00:00:00 2001 From: ansgarz <ansgar.zwick@meissa.de> Date: Wed, 12 Feb 2025 20:49:48 +0100 Subject: [PATCH] [skip ci] rename escapeAndEncloseByDoubleQuoteForShell --- .../core/processors/ContainerUbuntuHostProcessor.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/ContainerUbuntuHostProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/ContainerUbuntuHostProcessor.kt index 8391e97..6da3d4e 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/ContainerUbuntuHostProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/ContainerUbuntuHostProcessor.kt @@ -50,13 +50,13 @@ open class ContainerUbuntuHostProcessor( localExecution.exec(hostShell, "-c", dockerCmd + "rm $containerName") } - private fun quoteString(s: String): String { + private fun escapeAndEncloseByDoubleQuoteForShell(s: String): String { return s.escapeAndEncloseByDoubleQuoteForShell() } private fun buildCommand(vararg args: String): String { - return if (args.size == 1) quoteString(args[0]) else - if (args.size == 3 && SHELL == args[0] && "-c" == args[1]) SHELL + " -c " + quoteString(args[2]) + return if (args.size == 1) escapeAndEncloseByDoubleQuoteForShell(args[0]) else + if (args.size == 3 && SHELL == args[0] && "-c" == args[1]) SHELL + " -c " + escapeAndEncloseByDoubleQuoteForShell(args[2]) else args.joinToString(separator = " ") }