wix-incubator / monorepo-staged-precommit

9 stars 4 forks source link

Cannot commit if nvm.sh is not exist #1

Open shilomagen opened 4 years ago

shilomagen commented 4 years ago

Currently, nvm must be installed. If nvm is not installed the script fails and you can't commit. I would expect to have a fallback, something like:

command_exists nvm || {
  echo >&2 "precommit > can't find nvm in PATH, skipping precommit git hook"
  exit 0
}

BTW, I'm using fnm.

WDUT @nayish ?

nayish commented 4 years ago

If u want you can add support for fnm too, but we don't want people skipping this, people should install nvm/fnm before working with our repos anyways since we use .nvmrc.

nayish commented 4 years ago

@shilomagen is my answer ok?

shilomagen commented 4 years ago

Yeah of course, I will understand how to add support to fnm

On Tue, 27 Oct 2020 at 19:23 Nachshon Schwartz notifications@github.com wrote:

@shilomagen https://github.com/shilomagen is my answer ok?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/wix-incubator/monorepo-staged-precommit/issues/1#issuecomment-717399767, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZU2AOPOMYEJTQSYQJNWIDSM36ZTANCNFSM4S72T7CQ .

-- Shilo

shilomagen commented 4 years ago

Yeah, sure I will try to understand how to support fnm also