Skip to content

Commit

Permalink
Fix nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Jun 5, 2024
1 parent 78a586c commit 9407981
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function tailLog(daemonDir: string): Tail {

export async function netrcPath(): Promise<string> {
const expectedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
process.env["RUNNER_TEMP"] ?? os.tmpdir(),
"determinate-nix-installer-netrc",
);
try {
Expand All @@ -24,7 +24,7 @@ export async function netrcPath(): Promise<string> {
} catch {
// `nix-installer` was not used, the user may be registered with FlakeHub though.
const destinedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
process.env["RUNNER_TEMP"] ?? os.tmpdir(),
"magic-nix-cache-netrc",
);
try {
Expand Down

0 comments on commit 9407981

Please sign in to comment.