ngryman / cz-emoji

Commitizen adapter formatting commit messages using emojis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue on path (node 12.12.0)

tpucci opened this issue · comments

Hello,

I have found a bug on node 12.12.0 with cz-emoji@1.2.0.
Everything works on node 12.12.0 with cz-emoji@1.1.2.

I guess the culprit is this commit: 5312f27

❯ git cz
cz-cli@4.0.3, cz-emoji@1.2.0

(node:97971) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.dirname (path.js:1129:5)
    at /Users/****/.fnm/node-versions/v12.12.0/installation/lib/node_modules/cz-emoji/index.js:45:48
    at async loadConfig (/Users/****/.fnm/node-versions/v12.12.0/installation/lib/node_modules/cz-emoji/index.js:50:31)
(node:97971) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:97971) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

❯ git cz
cz-cli@4.0.3, cz-emoji@1.1.2

? Select the type of change you're committing: (Use arrow keys or type to search)
❯ style                  🎨  Improving structure / format of the code.
  perf                   ⚡️  Improving performance.
  prune                  🔥  Removing code or files.
  fix                    🐛  Fixing a bug.
  quickfix               🚑  Critical hotfix.
  feature                ✨  Introducing new features.
  docs                   📝  Writing docs.
(Move up and down to reveal more choices)

Same issue here. Only in some repo.

Hello, thanks for reporting the issue and good catch!

f09a0c9 should resolve the issue, I've released a new 1.2.1 version. Let me know if it works for you.

Yes it works ! Thanks :) Closing...