getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
142 stars 37 forks source link

fatal: not a git repository (or any of the parent directories): .git #612

Closed ethanlaj closed 2 months ago

ethanlaj commented 2 months ago

Environment

Latest vite plugin, latest @sentry/vite-plugin. Happens on older versions too

Steps to Reproduce

  1. Clone https://github.com/ethanlaj/vite-sentry-plugin-issue
  2. Delete .git directory from the cloned folder
  3. Run npm install
  4. Run npm run preview

Expected Result

A fatal error would not be logged into the console when the git repository isn't available. This is needed for monorepos that don't have git repositories initialized in the child directories (and Docker environments)

Actual Result

fatal: not a git repository (or any of the parent directories): .git - is logged to the console

chargome commented 2 months ago

@ethanlaj thanks for the raising this and also for providing a reproduction repo. Will be out with the next release 👍