[flutter_tools] re-use findProjectRoot on flutter command#104850
[flutter_tools] re-use findProjectRoot on flutter command#104850fluttergithubbot merged 4 commits intoflutter:masterfrom
Conversation
| } | ||
| } | ||
|
|
||
| class FakePubTargetDirectory extends Fake implements Pub { |
There was a problem hiding this comment.
What about adding an optional parameter to the FakePub constructor for dartToolDir that defaults to fileSystem.currentDirectory.childDirectory('.dart_tool'), rather than creating a whole new class?
There was a problem hiding this comment.
Oh wait, actually, doesn't this already get piped through as the directory parameter to .get()?
There was a problem hiding this comment.
Oh wait, actually, doesn't this already get piped through as the
directoryparameter to.get()?
I do not follow. Do you mean that fileSystem.currentDirectory... is not needed? This syncs are needed for the currentDirectory to be a "valid flutter project"
There was a problem hiding this comment.
Ohh I see what you mean yes I can just use the directory instead which is already in the function. Good call
|
|
||
| await commandRunner.run(<String>['get', targetDirectory.path]); | ||
|
|
||
| expect(await command.usageValues, const CustomDimensions( |
There was a problem hiding this comment.
Should we check that .dart_tool/package_config.json got written?
There was a problem hiding this comment.
I think you can delete this expectation actually, as its redundant with the previous test
Fixes: #104760
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.