-
-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Description
Recently I tried to test some plugins in a fresh Windows, I created a dummy blog with hexo init but forgot to install Git beforehand.
Lines 29 to 36 in f15fccb
| try { | |
| await spawn('git', ['clone', '--recurse-submodules', '--depth=1', '--quiet', GIT_REPO_URL, target], { | |
| stdio: 'inherit' | |
| }); | |
| } catch (err) { | |
| log.warn('git clone failed. Copying data instead'); | |
| await copyAsset(target); | |
| } |
The git command failed and copyAsset() is executed instead.
Lines 88 to 90 in f15fccb
| async function copyAsset(target) { | |
| await copyDir(ASSET_DIR, target, { ignoreHidden: false }); | |
| } |
That failed too because "assets/" folder (a submodule that points to hexo-starter) is not published.
I can think of two approaches:
- Publish "assets/" folder.
- Remove
copyAsset()and check git existence before running L30:if (!commandExistsSync('git')) log.warn('Please install git')
@hexojs/core
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels