diff --git a/packages/shorebird_cli/lib/src/commands/init_command.dart b/packages/shorebird_cli/lib/src/commands/init_command.dart index f8b59723..753551ee 100644 --- a/packages/shorebird_cli/lib/src/commands/init_command.dart +++ b/packages/shorebird_cli/lib/src/commands/init_command.dart @@ -30,7 +30,10 @@ class InitCommand extends ShorebirdCommand final progress = logger.progress('Initializing Shorebird'); try { if (!hasPubspecYaml) { - progress.fail('Could not find a "pubspec.yaml".'); + progress.fail(''' +Could not find a "pubspec.yaml". +Please make sure you are running "shorebird init" from the root of your Flutter project. +'''); return ExitCode.noInput.code; } } catch (error) { diff --git a/packages/shorebird_cli/test/src/commands/init_command_test.dart b/packages/shorebird_cli/test/src/commands/init_command_test.dart index fdce1db8..cefaef05 100644 --- a/packages/shorebird_cli/test/src/commands/init_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/init_command_test.dart @@ -72,7 +72,14 @@ environment: command.run, getCurrentDirectory: () => tempDir, ); - verify(() => progress.fail('Could not find a "pubspec.yaml".')).called(1); + verify( + () => progress.fail( + ''' +Could not find a "pubspec.yaml". +Please make sure you are running "shorebird init" from the root of your Flutter project. +''', + ), + ).called(1); expect(exitCode, ExitCode.noInput.code); });