Prefer coalescing over or-ing

This commit is contained in:
Luc Perkins 2024-04-24 11:13:40 -03:00
parent b87931b2dd
commit a2856cdfd2
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 6 additions and 6 deletions

4
dist/index.js generated vendored
View file

@ -97933,7 +97933,7 @@ class NixInstallerAction {
executionEnv.NIX_INSTALLER_SSL_CERT_FILE = this.sslCertFile; executionEnv.NIX_INSTALLER_SSL_CERT_FILE = this.sslCertFile;
} }
executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT = executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT =
this.idslib.getDiagnosticsUrl()?.toString() || ""; this.idslib.getDiagnosticsUrl()?.toString() ?? "";
// TODO: Error if the user uses these on not-MacOS // TODO: Error if the user uses these on not-MacOS
if (this.macEncrypt !== null) { if (this.macEncrypt !== null) {
if (runnerOs !== "macOS") { if (runnerOs !== "macOS") {
@ -98383,7 +98383,7 @@ class NixInstallerAction {
if (job === undefined) { if (job === undefined) {
return "no-jobs"; return "no-jobs";
} }
const outcomes = (job.steps || []).map((j) => j.conclusion || "unknown"); const outcomes = (job.steps ?? []).map((j) => j.conclusion ?? "unknown");
// Possible values: success, failure, cancelled, or skipped // Possible values: success, failure, cancelled, or skipped
// from: https://docs.github.com/en/actions/learn-github-actions/contexts // from: https://docs.github.com/en/actions/learn-github-actions/contexts
if (outcomes.includes("failure")) { if (outcomes.includes("failure")) {

4
dist/main.js generated vendored
View file

@ -269,7 +269,7 @@ class NixInstallerAction {
executionEnv.NIX_INSTALLER_SSL_CERT_FILE = this.sslCertFile; executionEnv.NIX_INSTALLER_SSL_CERT_FILE = this.sslCertFile;
} }
executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT = executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT =
this.idslib.getDiagnosticsUrl()?.toString() || ""; this.idslib.getDiagnosticsUrl()?.toString() ?? "";
// TODO: Error if the user uses these on not-MacOS // TODO: Error if the user uses these on not-MacOS
if (this.macEncrypt !== null) { if (this.macEncrypt !== null) {
if (runnerOs !== "macOS") { if (runnerOs !== "macOS") {
@ -719,7 +719,7 @@ class NixInstallerAction {
if (job === undefined) { if (job === undefined) {
return "no-jobs"; return "no-jobs";
} }
const outcomes = (job.steps || []).map((j) => j.conclusion || "unknown"); const outcomes = (job.steps ?? []).map((j) => j.conclusion ?? "unknown");
// Possible values: success, failure, cancelled, or skipped // Possible values: success, failure, cancelled, or skipped
// from: https://docs.github.com/en/actions/learn-github-actions/contexts // from: https://docs.github.com/en/actions/learn-github-actions/contexts
if (outcomes.includes("failure")) { if (outcomes.includes("failure")) {

View file

@ -360,7 +360,7 @@ class NixInstallerAction {
} }
executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT = executionEnv.NIX_INSTALLER_DIAGNOSTIC_ENDPOINT =
this.idslib.getDiagnosticsUrl()?.toString() || ""; this.idslib.getDiagnosticsUrl()?.toString() ?? "";
// TODO: Error if the user uses these on not-MacOS // TODO: Error if the user uses these on not-MacOS
if (this.macEncrypt !== null) { if (this.macEncrypt !== null) {
@ -921,7 +921,7 @@ class NixInstallerAction {
return "no-jobs"; return "no-jobs";
} }
const outcomes = (job.steps || []).map((j) => j.conclusion || "unknown"); const outcomes = (job.steps ?? []).map((j) => j.conclusion ?? "unknown");
// Possible values: success, failure, cancelled, or skipped // Possible values: success, failure, cancelled, or skipped
// from: https://docs.github.com/en/actions/learn-github-actions/contexts // from: https://docs.github.com/en/actions/learn-github-actions/contexts