'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
);
}
throwerror;
}
}
}
/**
* @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 {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}.
* @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary}
*/
functionisProbablyGradleDaemonProblem(
packageManager: PackageManager,
error: Error
){
if(
packageManager.id!=='gradle'||
process.env['RUNNER_OS']!=='Windows'
){
returnfalse;
}
constmessage=error.message||'';
returnmessage.startsWith('Tar failed with error: ');