From 8623377a3c8ad27f4597c2445a65a2d47d361e77 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Sun, 3 Mar 2024 20:34:25 +0000 Subject: [PATCH] don't use Deno.env directly --- deno.json | 2 +- sdk/builder.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index c83e65d..0e71eac 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@fluentci/codecov", - "version": "0.9.1", + "version": "0.9.2", "exports": "./mod.ts", "importMap": "import_map.json", "tasks": { diff --git a/sdk/builder.ts b/sdk/builder.ts index f06951a..10182d6 100644 --- a/sdk/builder.ts +++ b/sdk/builder.ts @@ -1,5 +1,6 @@ import { createGQLClient } from "./client.ts"; import { Context } from "./context.ts"; +import { env } from "../deps.ts"; /** * @hidden @@ -10,9 +11,9 @@ export function initDefaultContext(): Context { let ctx = new Context(); // Prefer DAGGER_SESSION_PORT if set - const daggerSessionPort = Deno.env.get("DAGGER_SESSION_PORT"); + const daggerSessionPort = env.get("DAGGER_SESSION_PORT"); if (daggerSessionPort) { - const sessionToken = Deno.env.get("DAGGER_SESSION_TOKEN"); + const sessionToken = env.get("DAGGER_SESSION_TOKEN"); if (!sessionToken) { throw new Error( "DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT"