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
6d5488ad
Commit
6d5488ad
authored
Apr 07, 2017
by
Ian Hickson
Committed by
GitHub
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to `flutter packages`. (#9278)
parent
ecc590f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
packages.dart
packages/flutter_tools/lib/src/commands/packages.dart
+16
-14
No files found.
packages/flutter_tools/lib/src/commands/packages.dart
View file @
6d5488ad
...
@@ -47,14 +47,15 @@ class PackagesGetCommand extends FlutterCommand {
...
@@ -47,14 +47,15 @@ class PackagesGetCommand extends FlutterCommand {
);
);
}
}
// TODO: implement description
@override
@override
String
get
description
=>
String
get
description
{
(
upgrade
?
'Upgrade'
:
'Get'
)
+
' packages in a Flutter project.'
;
return
'
${ upgrade ? "Upgrade" : "Get" }
packages in a Flutter project.'
;
}
@override
@override
String
get
invocation
=>
String
get
invocation
{
"
${runner.executableName}
packages
$name
[<target directory>]"
;
return
'
${runner.executableName}
packages
$name
[<target directory>]'
;
}
@override
@override
Future
<
Null
>
runCommand
()
async
{
Future
<
Null
>
runCommand
()
async
{
...
@@ -62,22 +63,23 @@ class PackagesGetCommand extends FlutterCommand {
...
@@ -62,22 +63,23 @@ class PackagesGetCommand extends FlutterCommand {
throwToolExit
(
'Too many arguments.
\n
$usage
'
);
throwToolExit
(
'Too many arguments.
\n
$usage
'
);
final
String
target
=
findProjectRoot
(
final
String
target
=
findProjectRoot
(
argResults
.
rest
.
length
==
1
?
argResults
.
rest
[
0
]
:
null
);
argResults
.
rest
.
length
==
1
?
argResults
.
rest
[
0
]
:
null
if
(
target
==
null
)
);
if
(
target
==
null
)
{
throwToolExit
(
throwToolExit
(
'Expected to find project root starting at '
+
'Expected to find project root in '
(
argResults
.
rest
.
length
==
1
'
${ argResults.rest.length == 1 ? argResults.rest[0] : "current working directory" }
.'
?
argResults
.
rest
[
0
]
);
:
'current working directory'
)
+
}
'
$usage
'
);
// TODO: If the user is using a local build, we should use the packages from their build instead of the cache.
// TODO(ianh): If the user is using a local build, we should use the
// packages from their build instead of the cache.
await
pubGet
(
await
pubGet
(
directory:
target
,
directory:
target
,
upgrade:
upgrade
,
upgrade:
upgrade
,
offline:
argResults
[
'offline'
],
offline:
argResults
[
'offline'
],
checkLastModified:
false
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