Skip to content

Commit cff143a

Browse files
authored
Pass working directory to Process.run when building debug extension in tests (#1726)
1 parent 7d4ecf5 commit cff143a

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

dwds/debug_extension/tool/build_extension.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ echo "Building DDC-compiled extension to dev_build/web directory."
3333
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
3434
dart run build_runner build web --delete-conflicting-outputs --output dev_build
3535
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
36-
"Updating the manifest.json file in dev_build/web directory."
36+
echo "Updating the manifest.json file in dev_build/web directory."
3737
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
3838
dart tool/update_dev_manifest.dart

dwds/test/fixtures/context.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -435,16 +435,12 @@ class TestContext {
435435
throw StateError(
436436
'Expected to be in /dwds directory, instead path was $currentDir.');
437437
}
438-
try {
439-
Directory.current = '$currentDir/debug_extension';
440-
final process = await Process.run(
441-
'tool/build_extension.sh',
442-
['prod'],
443-
);
444-
print(process.stdout);
445-
} finally {
446-
Directory.current = currentDir;
447-
}
438+
final process = await Process.run(
439+
'tool/build_extension.sh',
440+
['prod'],
441+
workingDirectory: '$currentDir/debug_extension',
442+
);
443+
print(process.stdout);
448444
}
449445

450446
Future<ChromeTab> _fetchDartDebugExtensionTab(

0 commit comments

Comments
 (0)