From 803b03fb11c5c021b68804ef92f75ea1d907c555 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Wed, 3 Apr 2024 17:11:03 +0200 Subject: [PATCH] fix(cli): use more robust url to path conversion --- cli/send.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/send.ts b/cli/send.ts index 832ed2f..6ec7b5b 100644 --- a/cli/send.ts +++ b/cli/send.ts @@ -4,6 +4,7 @@ import { Contact } from '../src/contact.ts' import { send } from '../src/send.ts' import type { Mail, Template } from '../types.ts' import type { JSX } from 'preact' +import { fromFileUrl } from '@std/path' const templates: Map< string, @@ -13,7 +14,8 @@ const templates: Map< > > = new Map() -const templatesDir = import.meta.resolve('../templates').slice('file://'.length) +const templatesDirUrl = import.meta.resolve('../templates') +const templatesDir = fromFileUrl(templatesDirUrl) //Load templates dynamicaly for await (