Skip to content

Commit 3fdf2a4

Browse files
committed
k, so we do want to swallow, but throw when building (#41)
1 parent 4752ad6 commit 3fdf2a4

7 files changed

Lines changed: 19 additions & 13 deletions

File tree

‎.github/mk-pantry-accessible.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
git config --global url."https://teaxyz:$1@github.com/teaxyz/pantry".insteadOf "https://github.com/teaxyz/pantry"

‎.github/workflows/cd.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ jobs:
3030
commence: ${{ steps.rev-parse.outputs.result == 'commence' }}
3131
steps:
3232
- uses: actions/checkout@v3
33-
- uses: teaxyz/setup@v0
3433

3534
#TMP until we go public
36-
- uses: webfactory/ssh-agent@v0.5.4
37-
with:
38-
ssh-private-key: ${{ secrets.PK }}
35+
- run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
36+
37+
- uses: teaxyz/setup@v0
3938

4039
- id: extract
4140
name: determine current version

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ jobs:
2525
VERBOSE: 1
2626
TEA_SECRET: ${{ secrets.TEA_SECRET }}
2727
steps:
28+
- uses: actions/checkout@v3
29+
2830
#TMP until we go public
29-
- uses: webfactory/ssh-agent@v0.5.4
30-
with:
31-
ssh-private-key: ${{ secrets.PK }}
31+
- run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
3232

33-
- uses: actions/checkout@v3
3433
- uses: teaxyz/setup@v0
3534
- run: ./scripts/test.sh
3635
env:

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Change how your team works.
1616
 
1717

1818

19-
# tea/cli 0.3.0
19+
# tea/cli 0.3.1
2020

2121
tea is a universal virtual‑environment manager:
2222

@@ -528,7 +528,7 @@ If you got this error message, you need to install tea:
528528
| Project | Version | Lock |
529529
|-------------|---------|--------|
530530
| deno.land | ^1.18 | 1.20.3 |
531-
| tea.xyz | ^0 | 0.3.0 |
531+
| tea.xyz | ^0 | 0.3.1 |
532532
533533
534534
[pantry]: ../../../../pantry

‎src/hooks/usePantry.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ async function installIfNecessary() {
202202
const cwd = prefix.parent().parent().mkpath()
203203
//FIXME before release, use https://
204204
await run({
205-
cmd: ["git", "clone", "git@github.com:teaxyz/pantry.git"],
205+
cmd: ["git", "clone", "https://github.com/teaxyz/pantry"],
206206
cwd
207207
})
208208
}

‎src/hooks/useShellEnv.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ export default async function useShellEnv(requirements: PackageRequirement[]): P
2020
const pending: PackageRequirement[] = []
2121

2222
for (const requirement of requirements) {
23-
const installation = await cellar.resolve(requirement)
23+
const installation = await cellar.resolve(requirement).swallow(/^not-found:/)
2424

2525
if (!installation) {
2626
pending.push(requirement)
27-
} else for (const key of EnvKeys)
27+
} else for (const key of EnvKeys) {
2828
for (const suffix of suffixes(key)!) {
2929
if (!vars[key]) vars[key] = []
3030
vars[key].compactUnshift(installation.path.join(suffix).compact()?.string)
@@ -37,6 +37,7 @@ export default async function useShellEnv(requirements: PackageRequirement[]): P
3737
vars.LIBRARY_PATH.compactUnshift(installation.path.join("lib").compact()?.string)
3838
vars.CPATH.compactUnshift(installation.path.join("include").compact()?.string)
3939
}
40+
}
4041
}
4142

4243
const defaults: Env = {}

‎src/prefab/build.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export default async function build({ pkg, deps }: Options): Promise<Path> {
1818
const sh = await pantry.getBuildScript(pkg)
1919
const { platform } = usePlatform()
2020

21+
if (env.pending.length) {
22+
throw {uninstalled: env.pending}
23+
}
24+
2125
/// FIXME: no one likes this. `set -o pipefail` is the reason for this requirement.
2226
const shell = platform === "linux" ? "bash" : "sh"
2327

0 commit comments

Comments
 (0)