mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-04-05 21:04:15 +02:00
[Bugfix] Do not override content of gradle.properties if it is exist
This commit is contained in:
parent
42faf281e6
commit
75e3dc9887
1 changed files with 4 additions and 1 deletions
|
@ -230,7 +230,10 @@ export class GradleStateCache {
|
|||
|
||||
private initializeGradleUserHome(gradleUserHome: string, initScriptsDir: string): void {
|
||||
const propertiesFile = path.resolve(gradleUserHome, 'gradle.properties')
|
||||
fs.writeFileSync(propertiesFile, 'org.gradle.daemon=false')
|
||||
const requiredProperties = 'org.gradle.daemon=false'
|
||||
if (!fs.existsSync(propertiesFile) || !fs.readFileSync(propertiesFile).includes(requiredProperties)) {
|
||||
fs.appendFileSync(propertiesFile, `\n${requiredProperties}`)
|
||||
}
|
||||
|
||||
const buildScanCapture = path.resolve(initScriptsDir, 'build-scan-capture.init.gradle')
|
||||
fs.writeFileSync(
|
||||
|
|
Loading…
Add table
Reference in a new issue