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
d9af9399
Commit
d9af9399
authored
Oct 12, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error message when missing the package-root
parent
9c483510
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+5
-2
flutter_command_runner.dart
...lutter_tools/lib/src/commands/flutter_command_runner.dart
+12
-0
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
d9af9399
...
...
@@ -23,8 +23,11 @@ class ArtifactStore {
static
String
_engineRevision
;
static
String
get
engineRevision
{
if
(
_engineRevision
==
null
)
_engineRevision
=
new
File
(
path
.
join
(
packageRoot
,
'sky_engine'
,
'REVISION'
)).
readAsStringSync
();
if
(
_engineRevision
==
null
)
{
File
revisionFile
=
new
File
(
path
.
join
(
packageRoot
,
'sky_engine'
,
'REVISION'
));
if
(
revisionFile
.
existsSync
())
_engineRevision
=
revisionFile
.
readAsStringSync
();
}
return
_engineRevision
;
}
...
...
packages/flutter_tools/lib/src/commands/flutter_command_runner.dart
View file @
d9af9399
...
...
@@ -88,6 +88,18 @@ class FlutterCommandRunner extends CommandRunner {
Logger
.
root
.
level
=
Level
.
FINE
;
ArtifactStore
.
packageRoot
=
globalResults
[
'package-root'
];
if
(!
FileSystemEntity
.
isDirectorySync
(
ArtifactStore
.
packageRoot
))
{
String
message
=
'
${ArtifactStore.packageRoot}
is not a valid directory.'
;
if
(
ArtifactStore
.
packageRoot
==
'packages'
)
{
if
(
FileSystemEntity
.
isFileSync
(
'pubspec.yaml'
))
message
+=
'
\n
Did you run `pub get` in this directory?'
;
else
message
+=
'
\n
Did you run this command from the same directory as your pubspec.yaml file?'
;
}
_logging
.
severe
(
message
);
return
2
;
}
buildConfigurations
=
_createBuildConfigurations
(
globalResults
);
return
super
.
runCommand
(
globalResults
);
...
...
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