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
3d8176ed
Commit
3d8176ed
authored
Mar 10, 2016
by
Eric Seidel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2571 from eseidelGoogle/run_pub_fail
`flutter run` should fail if `pub get` fails.
parents
8f603800
3e2a4d9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+5
-2
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/commands/run.dart
View file @
3d8176ed
...
...
@@ -81,8 +81,11 @@ class RunCommand extends RunCommandBase {
@override
Future
<
int
>
run
()
async
{
if
(
argResults
[
'pub'
])
await
pubGet
();
if
(
argResults
[
'pub'
])
{
int
exitCode
=
await
pubGet
();
if
(
exitCode
!=
0
)
return
exitCode
;
}
return
await
super
.
run
();
}
...
...
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
3d8176ed
...
...
@@ -15,6 +15,8 @@ Future<int> _runPub(Directory directory, { bool upgrade: false }) async {
for
(
FileSystemEntity
dir
in
directory
.
listSync
())
{
if
(
dir
is
Directory
&&
FileSystemEntity
.
isFileSync
(
dir
.
path
+
Platform
.
pathSeparator
+
'pubspec.yaml'
))
{
updateCount
++;
// TODO(eseidel): Should this fail immediately if pubGet fails?
// Currently we're ignoring the return code.
await
pubGet
(
directory:
dir
.
path
,
upgrade:
upgrade
,
checkLastModified:
false
);
}
}
...
...
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