Skip to content

Commit 7b9ce98

Browse files
authored
docs(readme): Update usage instructions for binary scripts (#20426)
Adds `--package` to binary scripts so the usage invokes the correct script. Closes #20422
1 parent 4d8baea commit 7b9ce98

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

packages/profiling-node/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,19 @@ the binaries will be copied. This is wasteful as you will likely only need one o
239239
runtime.
240240

241241
To prune the other libraries, profiling-node ships with a small utility script that helps you prune unused binaries. The
242-
script can be invoked via `sentry-prune-profiler-binaries`, use `--help` to see a list of available options or
243-
`--dry-run` if you want it to log the binaries that would have been deleted.
242+
script can be invoked via `sentry-prune-profiler-binaries`:
243+
244+
```bash
245+
npx --package=@sentry/profiling-node sentry-prune-profiler-binaries
246+
```
247+
248+
Use `--help` to see a list of available options or `--dry-run` if you want it to log the binaries that would have been
249+
deleted.
244250

245251
Example of only preserving a binary to run node16 on linux x64 musl.
246252

247253
```bash
248-
sentry-prune-profiler-binaries --target_dir_path=./dist --target_platform=linux --target_node=16 --target_stdlib=musl --target_arch=x64
254+
npx --package=@sentry/profiling-node sentry-prune-profiler-binaries --target_dir_path=./dist --target_platform=linux --target_node=16 --target_stdlib=musl --target_arch=x64
249255
```
250256

251257
Which will output something like

packages/remix/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,13 @@ Sentry.captureEvent({
122122
The Remix SDK provides a script that automatically creates a release and uploads sourcemaps. To generate sourcemaps with
123123
Remix, you need to call `remix build` with the `--sourcemap` option.
124124

125-
On release, call `sentry-upload-sourcemaps` to upload source maps and create a release. To see more details on how to
126-
use the command, call `sentry-upload-sourcemaps --help`.
125+
On release, call `sentry-upload-sourcemaps` to upload source maps and create a release:
126+
127+
```bash
128+
npx --package=@sentry/remix sentry-upload-sourcemaps
129+
```
130+
131+
To see more details on how to use the command, call `npx --package=@sentry/remix sentry-upload-sourcemaps --help`.
127132

128133
For more advanced configuration,
129134
[directly use `sentry-cli` to upload source maps.](https://github.com/getsentry/sentry-cli).

0 commit comments

Comments
 (0)