Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0d3c2d93
Commit
0d3c2d93
authored
Nov 20, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter build --engine-src-dir=<garbage> produces poor error message
This patch improves the error message. Fixes #468
parent
de772647
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
flutter_command_runner.dart
...lutter_tools/lib/src/commands/flutter_command_runner.dart
+17
-8
No files found.
packages/flutter_tools/lib/src/commands/flutter_command_runner.dart
View file @
0d3c2d93
...
...
@@ -178,6 +178,12 @@ class FlutterCommandRunner extends CommandRunner {
return
0
;
}
String
_tryEnginePath
(
String
enginePath
)
{
if
(
FileSystemEntity
.
isDirectorySync
(
path
.
join
(
enginePath
,
'out'
)))
return
enginePath
;
return
null
;
}
String
_findEnginePath
(
ArgResults
globalResults
)
{
String
engineSourcePath
=
globalResults
[
'engine-src-path'
]
??
Platform
.
environment
[
kFlutterEngineEnvironmentVariableName
];
bool
isDebug
=
globalResults
[
'debug'
];
...
...
@@ -194,14 +200,10 @@ class FlutterCommandRunner extends CommandRunner {
engineSourcePath
=
null
;
}
on
FileSystemException
{
}
}
if
(
engineSourcePath
==
null
)
{
String
tryEnginePath
(
String
enginePath
)
{
if
(
FileSystemEntity
.
isDirectorySync
(
path
.
join
(
enginePath
,
'out'
)))
return
enginePath
;
return
null
;
}
engineSourcePath
=
tryEnginePath
(
path
.
join
(
ArtifactStore
.
flutterRoot
,
'../engine/src'
));
}
if
(
engineSourcePath
==
null
)
engineSourcePath
=
_tryEnginePath
(
path
.
join
(
ArtifactStore
.
flutterRoot
,
'../engine/src'
));
if
(
engineSourcePath
==
null
)
{
stderr
.
writeln
(
'Unable to detect local Flutter engine build directory.
\n
'
'Either specify a dependency_override for the
$kFlutterEnginePackageName
package in your pubspec.yaml and
\n
'
...
...
@@ -211,6 +213,13 @@ class FlutterCommandRunner extends CommandRunner {
}
}
if
(
engineSourcePath
!=
null
&&
_tryEnginePath
(
engineSourcePath
)
==
null
)
{
stderr
.
writeln
(
'Unable to detect a Flutter engine build directory in
$engineSourcePath
.
\n
'
'Please ensure that
$engineSourcePath
is a Flutter engine
\'
src
\'
directory and that
\n
'
'you have compiled the engine in that directory, which should produce an
\'
out
\'
directory'
);
throw
new
ProcessExit
(
2
);
}
return
engineSourcePath
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment