Skip to content
Open
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
12 changes: 11 additions & 1 deletion puro/lib/src/env/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ Future<Version> getDartSDKVersion({
}

/// These files shouldn't be shared between flutter installs.
const cacheBlacklist = {'flutter_version_check.stamp', 'flutter.version.json'};
const cacheBlacklist = {
'flutter_version_check.stamp',
'flutter.version.json',
'flutter_web_sdk',
};

extension EnvPrefsModelExtension on PuroEnvPrefsModel {
bool get isPatched => hasPatched() && patched;
Expand Down Expand Up @@ -316,6 +320,12 @@ Future<void> syncFlutterCache({
for (final file in cacheDir.listSync()) {
cacheDirFiles.add(file.basename);
if (cacheBlacklist.contains(file.basename)) {
// A previous puro version may have symlinked this into the shared
// cache; remove the link so flutter re-creates it locally.
if (fs.isLinkSync(file.path)) {
log.d('Deleting blacklisted ${file.basename} symlink');
fs.link(file.path).deleteSync();
}
continue;
}
final sharedFile = sharedCacheDir.childFile(file.basename);
Expand Down