File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,10 @@ void main() {
139139 'when no pubspec.yaml exists' ,
140140 withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
141141 final tempDirectory = Directory .systemTemp.createTempSync ();
142- addTearDown (() => tempDirectory.deleteSync (recursive: true ));
142+ addTearDown (() {
143+ Directory .current = cwd;
144+ tempDirectory.deleteSync (recursive: true );
145+ });
143146
144147 Directory .current = tempDirectory.path;
145148 final result = await commandRunner.run (['test' ]);
@@ -154,7 +157,10 @@ void main() {
154157 'completes normally when no pubspec.yaml exists (recursive)' ,
155158 withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
156159 final tempDirectory = Directory .systemTemp.createTempSync ();
157- addTearDown (() => tempDirectory.deleteSync (recursive: true ));
160+ addTearDown (() {
161+ Directory .current = cwd;
162+ tempDirectory.deleteSync (recursive: true );
163+ });
158164
159165 Directory .current = tempDirectory.path;
160166
You can’t perform that action at this time.
0 commit comments