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
d3257053
Unverified
Commit
d3257053
authored
Jan 19, 2021
by
Jonah Williams
Committed by
GitHub
Jan 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] pub get skips example dir if there is no pubspec.yaml (#74264)
parent
ba66d7d8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
packages.dart
packages/flutter_tools/lib/src/commands/packages.dart
+1
-1
pub_get_test.dart
...tter_tools/test/commands.shard/hermetic/pub_get_test.dart
+20
-0
No files found.
packages/flutter_tools/lib/src/commands/packages.dart
View file @
d3257053
...
@@ -164,7 +164,7 @@ class PackagesGetCommand extends FlutterCommand {
...
@@ -164,7 +164,7 @@ class PackagesGetCommand extends FlutterCommand {
await
rootProject
.
regeneratePlatformSpecificTooling
();
await
rootProject
.
regeneratePlatformSpecificTooling
();
// Get/upgrade packages in example app as well
// Get/upgrade packages in example app as well
if
(
rootProject
.
hasExampleApp
)
{
if
(
rootProject
.
hasExampleApp
&&
rootProject
.
example
.
pubspecFile
.
existsSync
()
)
{
final
FlutterProject
exampleProject
=
rootProject
.
example
;
final
FlutterProject
exampleProject
=
rootProject
.
example
;
await
_runPubGet
(
exampleProject
.
directory
.
path
,
exampleProject
);
await
_runPubGet
(
exampleProject
.
directory
.
path
,
exampleProject
);
await
exampleProject
.
regeneratePlatformSpecificTooling
();
await
exampleProject
.
regeneratePlatformSpecificTooling
();
...
...
packages/flutter_tools/test/commands.shard/hermetic/pub_get_test.dart
View file @
d3257053
...
@@ -74,6 +74,26 @@ void main() {
...
@@ -74,6 +74,26 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
});
});
testUsingContext
(
'pub get skips example directory if it dooes not contain a pubspec.yaml'
,
()
async
{
fileSystem
.
currentDirectory
.
childFile
(
'pubspec.yaml'
).
createSync
();
fileSystem
.
currentDirectory
.
childDirectory
(
'example'
).
createSync
(
recursive:
true
);
final
PackagesGetCommand
command
=
PackagesGetCommand
(
'get'
,
false
);
final
CommandRunner
<
void
>
commandRunner
=
createTestCommandRunner
(
command
);
await
commandRunner
.
run
(<
String
>[
'get'
]);
expect
(
await
command
.
usageValues
,
<
CustomDimensions
,
Object
>{
CustomDimensions
.
commandPackagesNumberPlugins
:
'0'
,
CustomDimensions
.
commandPackagesProjectModule
:
'false'
,
CustomDimensions
.
commandPackagesAndroidEmbeddingVersion
:
'v1'
});
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
pub
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
FileSystem:
()
=>
fileSystem
,
});
}
}
class
FakePub
extends
Fake
implements
Pub
{
class
FakePub
extends
Fake
implements
Pub
{
...
...
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