From 69671e152ff3ada84a9eef22b238d0039773b4f8 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Tue, 11 Jan 2022 09:43:41 -0800 Subject: [PATCH] interop-testing: Fix script rewrite for Gradle 7.2 e0dca93c broke the interop-testing script for unix because Gradle changed the scripts for https://github.com/gradle/gradle/security/advisories/GHSA-6j2p-252f-7mw8 The solution here looks weird, but we are inserting the replacement string into a single-quoted string, so we stop that string, start a double-quoted string to allow the variable replacement, and then resume the previous string. --- interop-testing/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interop-testing/build.gradle b/interop-testing/build.gradle index 3790479f03..5a13c61614 100644 --- a/interop-testing/build.gradle +++ b/interop-testing/build.gradle @@ -76,7 +76,7 @@ task test_client(type: CreateStartScripts) { outputDir = new File(project.buildDir, 'tmp/scripts/' + name) classpath = startScripts.classpath doLast { - unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/') + unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\'"\$APP_HOME"\'/lib/') windowsScript.text = windowsScript.text.replace('JAVAAGENT_APP_HOME', '%APP_HOME%\\lib\\') } }