From c5f904ae6414e45573b3a358f8b6d13525132e02 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jakemac@google.com>
Date: Tue, 16 May 2017 12:28:24 -0700
Subject: [PATCH] resolve symbolic links before checking temp dir location
 (#1605)

On mac `Directory.systemTemp` starts with `/var` which is a symlink to `/private/var`, but the temp dir created by the ScratchSpace has the full resolved path (`/private/var/...`).
---
 test/barback/dartdevc/scratch_space_test.dart | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/barback/dartdevc/scratch_space_test.dart b/test/barback/dartdevc/scratch_space_test.dart
index f734ffab..7a2ac0d0 100644
--- a/test/barback/dartdevc/scratch_space_test.dart
+++ b/test/barback/dartdevc/scratch_space_test.dart
@@ -39,7 +39,9 @@ void main() {
     });
 
     test('Can create and delete a scratch space', () async {
-      expect(p.isWithin(Directory.systemTemp.path, scratchSpace.tempDir.path),
+      expect(
+          p.isWithin(Directory.systemTemp.resolveSymbolicLinksSync(),
+              scratchSpace.tempDir.resolveSymbolicLinksSync()),
           isTrue);
 
       for (var id in allAssets.keys) {
-- 
GitLab