dev-cli icon indicating copy to clipboard operation
dev-cli copied to clipboard

use package.json for version information? HG no .git.

Open twk-b opened this issue 7 years ago • 3 comments

$ oclif-dev pack fatal: not a git repository (or any of the parent directories): .git Error: Command failed: git rev-parse --short HEAD null at makeError (~/.npm-global/lib/node_modules/@oclif/dev-cli/node_modules/execa/index.js:172:9) at Promise.all.then.arr (~/.npm-global/lib/node_modules/@oclif/dev-cli/node_modules/execa/index.js:277:16) at

we use mercurial for scm, no .git dir

shouldnt it be using package.json .version?

twk-b avatar Oct 22 '18 21:10 twk-b

yes, we should be compatible with non-git repos

jdx avatar Oct 24 '18 23:10 jdx

I initiated a git folder in the project and committed files to fix this issue, But this should be handled in a proper way.

NipunaPrashan avatar Oct 30 '18 06:10 NipunaPrashan

I too am bumping into this error, but in a different context. I am using a Dockerfile to build my CLI and intentionally do not want or need my Git repo in my image.

My workaround is similar to that of @NipunaPrashan where I am installing git and running git init .. I would rather not have to do this, as it's not clear why git is a dependency for oclif.

hcharley avatar May 10 '19 21:05 hcharley