Skip to content

Could not find bin/import_sorter.dart in package import_sorter. #83

@xinwo

Description

@xinwo

Describe the bug
I got
Could not find bin/import_sorter.dart in package import_sorter.
when running
pre-commit run --all-files
or
flutter pub run import_sorter

But
flutter pub run import_sorter
works just fine

To Reproduce

  1. added
    import_sorter: ^4.6.0
    to
    pubspec.yaml
    dev_dependencies

  2. installed pre-commit

  3. create .pre-commit-config.yaml as below

repos:
  - repo: https://github.com/fluttercommunity/import_sorter
    rev: "master"
    hooks:
      - id: flutter-import-sorter
  1. run
    pre-commit run --all-files
    or
    flutter pub run import_sorter
    gives me
    Could not find bin/import_sorter.dart in package import_sorter.

Expected behavior
same result as
flutter pub run import_sorter

Screenshots
If applicable, add screenshots to help explain your problem.

Meta Information:

  • Dart Version: 3.5.4
  • import_sorter Version: 4.6.0
  • Is it a Flutter project? yes
  • What version of Flutter are you using (if flutter project): 3.24.5

Additional context
Add any other context about the problem here.

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