* @param packageManager the specified package manager by user * @param error the error thrown by the saveCache * @returns true if the given error seems related to the https://github.com/actions/cache/issues/454|running Gradle Daemon issue. * @see {@link https://github.com/actions/cache/is
( packageManager: PackageManager, error: Error )
| 182 | * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} |
| 183 | */ |
| 184 | function isProbablyGradleDaemonProblem( |
| 185 | packageManager: PackageManager, |
| 186 | error: Error |
| 187 | ) { |
| 188 | if ( |
| 189 | packageManager.id !== 'gradle' || |
| 190 | process.env['RUNNER_OS'] !== 'Windows' |
| 191 | ) { |
| 192 | return false; |
| 193 | } |
| 194 | const message = error.message || ''; |
| 195 | return message.startsWith('Tar failed with error: '); |
| 196 | } |