Skip to content

Commit

Permalink
lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Jul 7, 2023
1 parent 5af68cf commit 3c851c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ The following environment variables affect the behavior of Wireit:
| `WIREIT_PARALLEL` | [Maximum number of scripts to run at one time](#parallelism).<br><br>Defaults to 2×logical CPU cores.<br><br>Must be a positive integer or `infinity`. |
| `WIREIT_CACHE` | [Caching mode](#caching).<br><br>Defaults to `local` unless `CI` is `true`, in which case defaults to `none`.<br><br>Automatically set to `github` by the [`google/wireit@setup-github-actions-caching/v1`](#github-actions-caching) action.<br><br>Options:<ul><li>[`local`](#local-caching): Cache to local disk.</li><li>[`github`](#github-actions-caching): Cache to GitHub Actions.</li><li>`none`: Disable caching.</li></ul> |
| `CI` | Affects the default value of `WIREIT_CACHE`.<br><br>Automatically set to `true` by [GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables) and most other CI (continuous integration) services.<br><br>Must be exactly `true`. If unset or any other value, interpreted as `false`. |
| `WIREIT_MAX_OPEN_FILES` | Limits the number of file descriptors Wireit will have open concurrently. Used prevents resource exhaustion when checking large numbers of cached files. Set to a lower number if you hit file descriptor limits. |
| `WIREIT_MAX_OPEN_FILES` | Limits the number of file descriptors Wireit will have open concurrently. Used prevents resource exhaustion when checking large numbers of cached files. Set to a lower number if you hit file descriptor limits. |

### Glob patterns

Expand Down
2 changes: 1 addition & 1 deletion src/test/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('Semaphore restricts resource access', async () => {
const reservation1 = await semaphore.reserve();
const reservation2Promise = semaphore.reserve();
let hasResovled = false;
reservation2Promise.then(() => {
void reservation2Promise.then(() => {
hasResovled = true;
});
// Wait a bit to make sure the promise has had a chance to resolve.
Expand Down
2 changes: 1 addition & 1 deletion src/util/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Semaphore {

constructor(numSlots: number) {
if (numSlots <= 0) {
throw new Error('numSlots must be positive, got ' + numSlots);
throw new Error(`numSlots must be positive, got ${numSlots}`);
}
this.#remaining = numSlots;
}
Expand Down

0 comments on commit 3c851c9

Please sign in to comment.