Skip to content

Do not make a copy of PUB_CACHE, just create an empty one instead. #4032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions tool/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:args/args.dart';
import 'package:collection/collection.dart';
import 'package:crypto/crypto.dart' as crypto;
import 'package:dartdoc/src/io_utils.dart';
import 'package:dartdoc/src/package_meta.dart';
import 'package:path/path.dart' as path;
import 'package:sass/sass.dart' as sass;
Expand Down Expand Up @@ -497,12 +496,7 @@ Future<void> docSdk({bool withStats = false}) async => _docSdk(
Map<String, String> createThrowawayPubCache() {
var pubCache = Directory.systemTemp.createTempSync('pubcache');
var pubCacheBin = Directory(path.join(pubCache.path, 'bin'));
var defaultCache = Directory(_defaultPubCache);
if (defaultCache.existsSync()) {
io_utils.copy(defaultCache, pubCache);
} else {
pubCacheBin.createSync();
}
pubCacheBin.createSync();
return Map.fromIterables([
'PUB_CACHE',
'PATH',
Expand All @@ -512,9 +506,6 @@ Map<String, String> createThrowawayPubCache() {
]);
}

final String _defaultPubCache = Platform.environment['PUB_CACHE'] ??
path.context.resolveTildePath('~/.pub-cache');

Future<String> docTestingPackage({
bool withStats = false,
}) async {
Expand Down