From 06b0def4143f99289a37f3b08b86db55504a3019 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Mon, 2 Feb 2026 21:14:06 -0800 Subject: [PATCH] fix: throw on copy failure in _copyTemplateProject --- packages/shorebird_tests/test/shorebird_tests.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/shorebird_tests/test/shorebird_tests.dart b/packages/shorebird_tests/test/shorebird_tests.dart index 4100c6c5aca50..409f3963e95e1 100644 --- a/packages/shorebird_tests/test/shorebird_tests.dart +++ b/packages/shorebird_tests/test/shorebird_tests.dart @@ -157,8 +157,9 @@ Future _copyTemplateProject() async { ); // Use platform copy to preserve the full directory tree efficiently. + final ProcessResult result; if (Platform.isWindows) { - await Process.run('xcopy', [ + result = await Process.run('xcopy', [ template.path, testDir.path, '/E', @@ -166,7 +167,10 @@ Future _copyTemplateProject() async { '/Q', ]); } else { - await Process.run('cp', ['-R', template.path, testDir.path]); + result = await Process.run('cp', ['-R', template.path, testDir.path]); + } + if (result.exitCode != 0) { + throw Exception('Failed to copy template project: ${result.stderr}'); } return testDir;