Skip to content

PathNotFoundException: Cannot open file - pubspec.lock #85

Description

@myConsciousness

When using Pub workspaces for monorepos, pubspec.lock is not generated in packages.

So, the following handling is needed.

final pubspecLockFile = File('$currentPath/pubspec.lock');
if (pubspecLockFile.existsSync()) {
  final pubspecLock = loadYaml(pubspecLockFile.readAsStringSync());
  dependencies.addAll(pubspecLock['packages'].keys);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions