Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
wrn14897 committed Jun 27, 2024
1 parent e2f343a commit f86eb8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
In your build pipeline, you will need to run the CLI tool. Here's how to run it:

```sh
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --apiKey="your-api-key"
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --serviceKey="your-service-account-api-key"
```

You can also add this as an npm script
Expand All @@ -20,7 +20,7 @@ You can also add this as an npm script
}
```

Optionally, you can set the `HYPERDX_API_ACCESS_KEY` environment variable to avoid passing the `apiKey` flag.
Optionally, you can set the `HYPERDX_SERVICE_KEY` environment variable to avoid passing the `serviceKey` flag.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const uploadSourcemaps = async ({
releaseId?: string;
}) => {
if (!serviceKey || serviceKey === '') {
if (process.env.HYPERDX_API_ACCESS_KEY) {
serviceKey = process.env.HYPERDX_API_ACCESS_KEY;
if (process.env.HYPERDX_SERVICE_KEY) {
serviceKey = process.env.HYPERDX_SERVICE_KEY;
} else {
throw new Error('service key cannot be empty');
}
Expand Down

0 comments on commit f86eb8b

Please sign in to comment.