Unverified Commit 20ff180a authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Update Flutter desktop doc URL in error message (#96559)

When desktop support is not present in an existing project, certain
flutter tool commands raise an error that direct the user to
documentation on how to add desktop support to an existing Flutter
project. In a recent revamp of the webside, the URL was very slightly
changed (flutter.dev -> docs.flutter.dev).

This updates the error message to output the new URL.

Issue: https://github.com/flutter/flutter/issues/94398
parent d063961d
...@@ -38,7 +38,7 @@ Future<void> buildLinux( ...@@ -38,7 +38,7 @@ Future<void> buildLinux(
target ??= 'lib/main.dart'; target ??= 'lib/main.dart';
if (!linuxProject.cmakeFile.existsSync()) { if (!linuxProject.cmakeFile.existsSync()) {
throwToolExit('No Linux desktop project configured. See ' throwToolExit('No Linux desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Linux support to a project.'); 'to learn about adding Linux support to a project.');
} }
......
...@@ -31,7 +31,7 @@ Future<void> buildMacOS({ ...@@ -31,7 +31,7 @@ Future<void> buildMacOS({
}) async { }) async {
if (!flutterProject.macos.xcodeWorkspace.existsSync()) { if (!flutterProject.macos.xcodeWorkspace.existsSync()) {
throwToolExit('No macOS desktop project configured. ' throwToolExit('No macOS desktop project configured. '
'See https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'See https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding macOS support to a project.'); 'to learn about adding macOS support to a project.');
} }
......
...@@ -32,7 +32,7 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, { ...@@ -32,7 +32,7 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {
if (!windowsProject.cmakeFile.existsSync()) { if (!windowsProject.cmakeFile.existsSync()) {
throwToolExit( throwToolExit(
'No Windows desktop project configured. See ' 'No Windows desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Windows support to a project.'); 'to learn about adding Windows support to a project.');
} }
...@@ -124,7 +124,7 @@ Future<void> buildWindowsUwp(WindowsUwpProject windowsProject, BuildInfo buildIn ...@@ -124,7 +124,7 @@ Future<void> buildWindowsUwp(WindowsUwpProject windowsProject, BuildInfo buildIn
if (!windowsProject.existsSync()) { if (!windowsProject.existsSync()) {
throwToolExit( throwToolExit(
'No Windows UWP desktop project configured. See ' 'No Windows UWP desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Windows support to a project.', 'to learn about adding Windows support to a project.',
); );
} }
......
...@@ -114,7 +114,7 @@ void main() { ...@@ -114,7 +114,7 @@ void main() {
expect(createTestCommandRunner(command).run( expect(createTestCommandRunner(command).run(
const <String>['build', 'linux', '--no-pub'] const <String>['build', 'linux', '--no-pub']
), throwsToolExit(message: 'No Linux desktop project configured. See ' ), throwsToolExit(message: 'No Linux desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Linux support to a project.')); 'to learn about adding Linux support to a project.'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Platform: () => linuxPlatform, Platform: () => linuxPlatform,
......
...@@ -131,7 +131,7 @@ void main() { ...@@ -131,7 +131,7 @@ void main() {
expect(createTestCommandRunner(command).run( expect(createTestCommandRunner(command).run(
const <String>['build', 'macos', '--no-pub'] const <String>['build', 'macos', '--no-pub']
), throwsToolExit(message: 'No macOS desktop project configured. See ' ), throwsToolExit(message: 'No macOS desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding macOS support to a project.')); 'to learn about adding macOS support to a project.'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Platform: () => macosPlatform, Platform: () => macosPlatform,
......
...@@ -159,7 +159,7 @@ void main() { ...@@ -159,7 +159,7 @@ void main() {
expect(createTestCommandRunner(command).run( expect(createTestCommandRunner(command).run(
const <String>['windows', '--no-pub'] const <String>['windows', '--no-pub']
), throwsToolExit(message: 'No Windows desktop project configured. See ' ), throwsToolExit(message: 'No Windows desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Windows support to a project.')); 'to learn about adding Windows support to a project.'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Platform: () => windowsPlatform, Platform: () => windowsPlatform,
...@@ -489,7 +489,7 @@ C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier ...@@ -489,7 +489,7 @@ C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier
expect(createTestCommandRunner(command).run( expect(createTestCommandRunner(command).run(
const <String>['winuwp', '--no-pub'] const <String>['winuwp', '--no-pub']
), throwsToolExit(message: 'No Windows UWP desktop project configured. See ' ), throwsToolExit(message: 'No Windows UWP desktop project configured. See '
'https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app ' 'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Windows support to a project.')); 'to learn about adding Windows support to a project.'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Platform: () => windowsPlatform, Platform: () => windowsPlatform,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment