Skip to content

Commit a298f98

Browse files
authored
Remove unused path are to PubspecLock.read (#313)
It'll just cause problems since the call to `pub deps` is not updated to correspond to the file location
1 parent 6d99401 commit a298f98

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

webdev/lib/src/command/shared.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ List<String> buildRunnerArgs(
5858
return arguments;
5959
}
6060

61-
Future<PubspecLock> readPubspecLock(Configuration configuration,
62-
[String path]) async {
63-
var pubspecLock = await PubspecLock.read(path);
61+
Future<PubspecLock> readPubspecLock(Configuration configuration) async {
62+
var pubspecLock = await PubspecLock.read();
6463
await checkPubspecLock(pubspecLock,
6564
requireBuildWebCompilers: configuration.requireBuildWebCompilers);
6665
return pubspecLock;

webdev/lib/src/pubspec.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ class PubspecLock {
7474

7575
PubspecLock(this._packages);
7676

77-
static Future<PubspecLock> read([String path]) async {
78-
path ??= 'pubspec.lock';
77+
static Future<PubspecLock> read() async {
7978
await _runPubDeps();
8079

81-
var pubspecLock = loadYaml(await File(path).readAsString()) as YamlMap;
80+
var pubspecLock =
81+
loadYaml(await File('pubspec.lock').readAsString()) as YamlMap;
8282

8383
var packages = pubspecLock['packages'] as YamlMap;
8484
return PubspecLock(packages);

0 commit comments

Comments
 (0)