fix(opencode): fail on brew repo lookup errors
This commit is contained in:
parent
054f848307
commit
add16af117
1 changed files with 8 additions and 3 deletions
|
|
@ -188,9 +188,14 @@ export namespace Installation {
|
|||
result = tap
|
||||
break
|
||||
}
|
||||
const repo = (await Process.text(["brew", "--repo", "anomalyco/tap"], { env, nothrow: true })).text.trim()
|
||||
if (repo) {
|
||||
const pull = await Process.run(["git", "pull", "--ff-only"], { cwd: repo, env, nothrow: true })
|
||||
const repo = await Process.text(["brew", "--repo", "anomalyco/tap"], { env, nothrow: true })
|
||||
if (repo.code !== 0) {
|
||||
result = repo
|
||||
break
|
||||
}
|
||||
const dir = repo.text.trim()
|
||||
if (dir) {
|
||||
const pull = await Process.run(["git", "pull", "--ff-only"], { cwd: dir, env, nothrow: true })
|
||||
if (pull.code !== 0) {
|
||||
result = pull
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue