Skip to content

Commit 31c2fc0

Browse files
committed
Fix never using git for the pantry overlay step
1 parent ba3be69 commit 31c2fc0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</p>
1717

1818

19-
# tea/cli 0.31.1
19+
# tea/cli 0.31.2
2020

2121
`tea` puts the whole open source ecosystem at your fingertips:
2222

src/hooks/useSync.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export default async function() {
5252
async function git(...args: (string | Path)[]) {
5353
const pkg = await useCellar().has({ project: 'git-scm.org', constraint: new semver.Range('*') })
5454
const git = (pkg?.path ?? usr())?.join("bin/git")
55-
if (git) await run({cmd: [git, ...args]})
56-
throw new Error("no-git") // caught above to trigger http download instead
55+
if (!git) throw new Error("no-git") // caught above to trigger http download instead
56+
await run({cmd: [git, ...args]})
5757

5858
function usr() {
5959
// only return /usr/bin if in the PATH so user can explicitly override this
@@ -64,7 +64,7 @@ async function git(...args: (string | Path)[]) {
6464
if (host().platform == 'darwin') {
6565
if (new Path("/Library/Developer/CommandLineTools/usr/bin/git").isExecutableFile()) return rv
6666
if (new Path("/Application/Xcode.app").isDirectory()) return rv
67-
return
67+
return // don’t use `git`
6868
}
6969

7070
return rv

0 commit comments

Comments
 (0)