Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Jul 19, 2024
1 parent 5e2b621 commit 7f53e3e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sources/src/setup-gradle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ async function determineGradleUserHome(): Promise<string> {
return defaultGradleUserHome
}

core.info(`Gradle User Home = ${defaultGradleUserHome}`)
core.info(`os.platform() == ${os.platform()}`)
core.info(`D: exists ${fs.existsSync('D:\\a\\')}`)
core.info(`defaultGradleUserHome.startsWith('C:\\') = ${defaultGradleUserHome.startsWith('C:\\')}`)

// Switch Gradle User Home to faster 'D:' drive if possible
if (os.platform() !== 'win32' && defaultGradleUserHome.startsWith('C:\\') && !fs.existsSync('D:\\a\\')) {
if (os.platform() === 'win32' && defaultGradleUserHome.startsWith('C:\\') && fs.existsSync('D:\\a\\')) {
const fasterGradleUserHome = 'D:\\a\\.gradle'
core.info(`Configuring ${fasterGradleUserHome} for Gradle User Home to leverage (potentially) faster drive.`)
core.exportVariable('GRADLE_USER_HOME', fasterGradleUserHome)
Expand Down

0 comments on commit 7f53e3e

Please sign in to comment.