MCPcopy Index your code
hub / github.com/actions/setup-java / isProbablyGradleDaemonProblem

Function isProbablyGradleDaemonProblem

src/cache.ts:184–196  ·  view source on GitHub ↗

* @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
)

Source from the content-addressed store, hash-verified

182 * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary}
183 */
184function 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}

Callers 1

saveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected