Skip to content

Commit 09d354f

Browse files
sstricklCommit Queue
authored andcommitted
[pkg/dartdev] Use ~/.dart/dartdev/sdk_cache as the SDK cache directory.
Currently, the SDK cache for cross compilers uses ~/.dart if the user's home directory exists. Instead, use ~/.dart/dartdev/sdk_cache to avoid polluting the top level of ~/.dart with cache directories. TEST=pkg/dartdev Issue: #60922 Change-Id: Ifc69e2a53abc6627c65f4fb30f94b1c3c25c7064 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438701 Reviewed-by: Daco Harkes <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent d8b58cf commit 09d354f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/dartdev/lib/src/commands/compile.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ Remove debugging information from the output and save it separately to the speci
602602
}
603603

604604
var cacheDir = getDartStorageDirectory();
605-
if (cacheDir == null) {
605+
if (cacheDir != null) {
606+
cacheDir = Directory(path.join(cacheDir.path, 'dartdev', 'sdk_cache'));
607+
} else {
606608
cacheDir = Directory.systemTemp.createTempSync();
607609
log.stdout('Cannot get dart storage directory. '
608610
'Using temp dir ${cacheDir.path}');

0 commit comments

Comments
 (0)