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
dff0edbc
Commit
dff0edbc
authored
Oct 14, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init command errors out
We were checking for a pubspec.yaml too early.
parent
abe69c7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
flutter_command_runner.dart
...lutter_tools/lib/src/commands/flutter_command_runner.dart
+14
-8
No files found.
packages/flutter_tools/lib/src/commands/flutter_command_runner.dart
View file @
dff0edbc
...
...
@@ -85,7 +85,14 @@ class FlutterCommandRunner extends CommandRunner {
help:
'Path to your packages directory.'
,
defaultsTo:
'packages'
);
}
List
<
BuildConfiguration
>
buildConfigurations
;
List
<
BuildConfiguration
>
get
buildConfigurations
{
if
(
_buildConfigurations
==
null
)
_buildConfigurations
=
_createBuildConfigurations
(
_globalResults
);
return
_buildConfigurations
;
}
List
<
BuildConfiguration
>
_buildConfigurations
;
ArgResults
_globalResults
;
Future
<
int
>
runCommand
(
ArgResults
globalResults
)
async
{
if
(
globalResults
[
'verbose'
])
...
...
@@ -94,6 +101,11 @@ class FlutterCommandRunner extends CommandRunner {
if
(
globalResults
[
'very-verbose'
])
Logger
.
root
.
level
=
Level
.
FINE
;
_globalResults
=
globalResults
;
return
super
.
runCommand
(
globalResults
);
}
List
<
BuildConfiguration
>
_createBuildConfigurations
(
ArgResults
globalResults
)
{
ArtifactStore
.
packageRoot
=
globalResults
[
'package-root'
];
if
(!
FileSystemEntity
.
isDirectorySync
(
ArtifactStore
.
packageRoot
))
{
String
message
=
'
${ArtifactStore.packageRoot}
is not a valid directory.'
;
...
...
@@ -104,15 +116,9 @@ class FlutterCommandRunner extends CommandRunner {
message
+=
'
\n
Did you run this command from the same directory as your pubspec.yaml file?'
;
}
_logging
.
severe
(
message
);
return
2
;
exit
(
2
)
;
}
buildConfigurations
=
_createBuildConfigurations
(
globalResults
);
return
super
.
runCommand
(
globalResults
);
}
List
<
BuildConfiguration
>
_createBuildConfigurations
(
ArgResults
globalResults
)
{
String
enginePath
=
globalResults
[
'engine-src-path'
];
bool
isDebug
=
globalResults
[
'debug'
];
bool
isRelease
=
globalResults
[
'release'
];
...
...
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