fix
This commit is contained in:
@@ -27,11 +27,12 @@ async function fetchVersions() {
|
|||||||
|
|
||||||
async function download(sha) {
|
async function download(sha) {
|
||||||
const folder = await fs.mkdtemp(path.join(os.tmpdir(), 'xmake'))
|
const folder = await fs.mkdtemp(path.join(os.tmpdir(), 'xmake'))
|
||||||
await exec('git', ['init'])
|
const opt = { cwd: folder }
|
||||||
await exec('git', ['remote', 'add', 'origin', 'https://github.com/xmake-io/xmake.git'])
|
await exec('git', ['init'], opt)
|
||||||
await exec('git', ['fetch'])
|
await exec('git', ['remote', 'add', 'origin', 'https://github.com/xmake-io/xmake.git'], opt)
|
||||||
await exec('git', ['checkout', sha])
|
await exec('git', ['fetch'], opt)
|
||||||
await exec('git', ['submodule', 'update', '--init', '--recursive'])
|
await exec('git', ['checkout', sha], opt)
|
||||||
|
await exec('git', ['submodule', 'update', '--init', '--recursive'], opt)
|
||||||
return folder
|
return folder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user