From f0deaabb4753de8d2590a8b443fe15f761ad69f2 Mon Sep 17 00:00:00 2001 From: David Sherret <dsherret@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:40:46 -0400 Subject: [PATCH] feat: upgrade to which 0.3.0 (#136) --- src/deps.ts | 2 +- src/shell.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/deps.ts b/src/deps.ts index 269df30..aa7a53b 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -8,4 +8,4 @@ export { readerFromStreamReader } from "https://deno.land/std@0.182.0/streams/re export { writeAll, writeAllSync } from "https://deno.land/std@0.182.0/streams/write_all.ts"; export { default as localDataDir } from "https://deno.land/x/dir@1.5.1/data_local_dir/mod.ts"; export { outdent } from "https://deno.land/x/outdent@v0.8.0/src/index.ts"; -export { RealEnvironment as DenoWhichRealEnvironment, which, whichSync } from "https://deno.land/x/which@0.2.2/mod.ts"; +export { RealEnvironment as DenoWhichRealEnvironment, which, whichSync } from "https://deno.land/x/which@0.3.0/mod.ts"; diff --git a/src/shell.ts b/src/shell.ts index c95b053..3f4d4ac 100644 --- a/src/shell.ts +++ b/src/shell.ts @@ -768,9 +768,7 @@ async function resolveCommand(commandName: string, context: Context): Promise<Re const realEnvironment = new DenoWhichRealEnvironment(); const commandPath = await which(commandName, { os: Deno.build.os, - fileExists(path: string) { - return realEnvironment.fileExists(path); - }, + stat: realEnvironment.stat, env(key) { return context.getVar(key); },