Fix nullish coalescing

This commit is contained in:
Luc Perkins 2024-06-05 09:54:12 -07:00
parent 78a586ce0e
commit 9407981200
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
2 changed files with 3 additions and 2 deletions

View file

@ -60,6 +60,7 @@
"@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error", "@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error", "@typescript-eslint/require-array-sort-compare": "error",

View file

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