datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
824 stars 98 forks source link

Degit error if git not installed #430

Open olayway opened 1 year ago

olayway commented 1 year ago

If git is not installed the following error will show up when running our CLI install command:

% npx flowershow@0.1.4 install
? Create Flowershow project in current directory? Yes
? Path to the folder with your markdown files docs
? Select a folder with your assets (attachments) assets
⠋  Creating Flowershow template in /usr/home/user/.flowershow
 ERROR  Failed to clone Flowershow template into /usr/home/user/.flowershow. This may be a problem with Flowershow. Please let us know about it by submitting an issue: https://github.com/flowershow/flowershow/issues.
DegitError: could not find commit hash for HEAD
    at Degit._cloneWithTar (/usr/home/user/.npm/_npx/e8b63b56405f0d67/node_modules/degit/dist/index-688c5d50.js:14258:10)
    at async Degit.clone (/usr/home/user/.npm/_npx/e8b63b56405f0d67/node_modules/degit/dist/index-688c5d50.js:14096:4)
    at async Installer.install (file:///usr/home/user/.npm/_npx/e8b63b56405f0d67/node_modules/flowershow/src/lib/Installer.js:131:13)
    at async install (file:///usr/home/user/.npm/_npx/e8b63b56405f0d67/node_modules/flowershow/src/lib/install.js:27:5) {
  code: 'MISSING_REF',
  ref: 'HEAD'
}

Originally posted by @lapo-luchini in https://github.com/flowershow/flowershow/issues/298#issuecomment-1433247548