best icon indicating copy to clipboard operation
best copied to clipboard

best CLI requires git to run

Open pmdartus opened this issue 6 years ago • 2 comments

Observations

Following the getting started, when running the yarn best command the CLI throws the following error:

ERROR     Error: Unable to read git information
    at generateProjectConfigs (/Users/p.dartus/code/github/pmdartus/benchmark-ci-test/node_modules/@best/config/build/index.js:10:19)
    at readConfig (/Users/p.dartus/code/github/pmdartus/benchmark-ci-test/node_modules/@best/config/build/index.js:68:45)
    at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.

Does best should absolutely require to be run in a git enabled directory? If it is the case then the documentation needs to be updated.

Update: I took me multiple attempts to make the best CLI happy:

  • after running git init, best requires at least 1 commit on the master branch.
  • after running git commit, best requires at least a remote to be present.
  • after adding a remote, best is still not happy here. I created a specific issue for this error #185

Versions

  • node: 10.16.0
  • best: 4.0.0-alpha4

pmdartus avatar Jul 29 '19 05:07 pmdartus

That’s a good question. I believe there are a good number of things that assume the Git info will be available, but that should be reasonably easy to fix since we have types!

What do you think @diervo, should we require users to run Best in a git enabled directory?

jasonsilberman avatar Jul 29 '19 05:07 jasonsilberman

I think we should, otherwise we can't do comparison or tracking. If anything we could add a flag to ignore git for specific cases.

diervo avatar Jul 29 '19 15:07 diervo