Skip to content

Commit

Permalink
fix: config checking for api keys in test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon committed Jan 28, 2024
1 parent 69cb041 commit 02b2f1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ This was made to run with [Bun](https://bun.sh/), but you can also use a precomp
#### Without Bun

```bash
wget https://github.com/leona/helix-gpt/releases/download/0.13/helix-gpt-0.13-x86_64-linux.tar.gz \
wget https://github.com/leona/helix-gpt/releases/download/0.14/helix-gpt-0.14-x86_64-linux.tar.gz \
-O /tmp/helix-gpt.tar.gz \
&& tar -zxvf /tmp/helix-gpt.tar.gz \
&& mv helix-gpt-0.13-x86_64-linux /usr/bin/helix-gpt \
&& mv helix-gpt-0.14-x86_64-linux /usr/bin/helix-gpt \
&& chmod +x /usr/bin/helix-gpt
```

#### With Bun

```bash
wget https://github.com/leona/helix-gpt/releases/download/0.13/helix-gpt-0.13.js -O helix-gpt.js
wget https://github.com/leona/helix-gpt/releases/download/0.14/helix-gpt-0.14.js -O helix-gpt.js
```

### Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (values.authCopilot) {
process.exit(0)
}

if (!values.openaiKey?.length && !values.copilotApiKey?.length) {
if (!Bun.env.TEST_RUNNER?.length && !values.openaiKey?.length && !values.copilotApiKey?.length) {
log("no handler key provided")
throw new Error("no handler key provided")
}
Expand Down

0 comments on commit 02b2f1b

Please sign in to comment.