Skip to content

Commit 5d74d50

Browse files
committed
fix: get latest version of template when run update
1 parent b94cd59 commit 5d74d50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cloneRepository.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const paths = require('./paths')
55
const { promisify } = require('util')
66
const throwError = require('./throwError')
77
const semver = require('semver')
8+
const log = require('./log')
89

910

1011
const access = promisify(fs.access)
@@ -41,9 +42,11 @@ module.exports = async (repository, version) => {
4142
].join('\n'))
4243
}
4344

44-
gitT.checkout(version)
45+
await gitT.checkout(version)
46+
log.info(`switch to template version: ${version}`)
4547
} else if (tags.length) {
4648
await gitT.checkout(tags[0])
49+
log.info(`switch to template version: ${tags[0]}`)
4750
}
4851

4952
return { templatePath, currentBranch }

0 commit comments

Comments
 (0)