Fix linting issues

This commit is contained in:
Jill Regan
2026-02-18 13:57:08 -05:00
parent 4a997a0402
commit 95478552e8
3 changed files with 9 additions and 6 deletions

View File

@@ -26,7 +26,6 @@ const loadSecretsAction = async () => {
dotenv.config({ path: file }); dotenv.config({ path: file });
} }
const isConnect = const isConnect =
process.env[envConnectHost] && process.env[envConnectToken]; process.env[envConnectHost] && process.env[envConnectToken];
// If Connect is used, download and install the CLI // If Connect is used, download and install the CLI

View File

@@ -210,7 +210,6 @@ describe("loadSecrets when using Service Account", () => {
mockResolve.mockResolvedValue("resolved-secret-value"); mockResolve.mockResolvedValue("resolved-secret-value");
}); });
it("does not call op env ls when using Service Account", async () => { it("does not call op env ls when using Service Account", async () => {
await loadSecrets(false); await loadSecrets(false);
expect(exec.getExecOutput).not.toHaveBeenCalled(); expect(exec.getExecOutput).not.toHaveBeenCalled();
@@ -219,7 +218,10 @@ describe("loadSecrets when using Service Account", () => {
it("sets step output with resolved value when export-env is false", async () => { it("sets step output with resolved value when export-env is false", async () => {
await loadSecrets(false); await loadSecrets(false);
expect(core.setOutput).toHaveBeenCalledTimes(1); expect(core.setOutput).toHaveBeenCalledTimes(1);
expect(core.setOutput).toHaveBeenCalledWith("MY_SECRET", "resolved-secret-value"); expect(core.setOutput).toHaveBeenCalledWith(
"MY_SECRET",
"resolved-secret-value",
);
}); });
it("masks secret with setSecret when export-env is false", async () => { it("masks secret with setSecret when export-env is false", async () => {
@@ -247,7 +249,10 @@ describe("loadSecrets when using Service Account", () => {
it("does not set step output when export-env is true", async () => { it("does not set step output when export-env is true", async () => {
await loadSecrets(true); await loadSecrets(true);
expect(core.setOutput).not.toHaveBeenCalledWith("MY_SECRET", expect.anything()); expect(core.setOutput).not.toHaveBeenCalledWith(
"MY_SECRET",
expect.anything(),
);
}); });
it("masks secret with setSecret when export-env is true", async () => { it("masks secret with setSecret when export-env is true", async () => {

View File

@@ -148,8 +148,7 @@ const loadSecretsViaServiceAccount = async (
}; };
export const loadSecrets = async (shouldExportEnv: boolean): Promise<void> => { export const loadSecrets = async (shouldExportEnv: boolean): Promise<void> => {
const isConnect = const isConnect = process.env[envConnectHost] && process.env[envConnectToken];
process.env[envConnectHost] && process.env[envConnectToken];
if (isConnect) { if (isConnect) {
await loadSecretsViaConnect(shouldExportEnv); await loadSecretsViaConnect(shouldExportEnv);