improve error message when --base-href argument does not start with / (#142667)
Resolves https://github.com/flutter/flutter/issues/137700. In particular, see [this comment from the thread](https://github.com/flutter/flutter/issues/137700#issuecomment-1920241979) to see exactly what this PR is addressing.
This commit is contained in:
@@ -166,7 +166,10 @@ class BuildWebCommand extends BuildSubCommand {
|
||||
}
|
||||
final String? baseHref = stringArg('base-href');
|
||||
if (baseHref != null && !(baseHref.startsWith('/') && baseHref.endsWith('/'))) {
|
||||
throwToolExit('base-href should start and end with /');
|
||||
throwToolExit(
|
||||
'Received a --base-href value of "$baseHref"\n'
|
||||
'--base-href should start and end with /',
|
||||
);
|
||||
}
|
||||
if (!flutterProject.web.existsSync()) {
|
||||
throwToolExit('Missing index.html.');
|
||||
|
||||
Reference in New Issue
Block a user