From 3b5eb172502ea538affe87227d57bacb84fef810 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 12 Feb 2024 13:20:04 +1300 Subject: [PATCH] fix: Use absolute path for file URL Based on . --- src/commands/basemaps-mapsheet/create-mapsheet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/basemaps-mapsheet/create-mapsheet.ts b/src/commands/basemaps-mapsheet/create-mapsheet.ts index bde97f58..396e144b 100644 --- a/src/commands/basemaps-mapsheet/create-mapsheet.ts +++ b/src/commands/basemaps-mapsheet/create-mapsheet.ts @@ -87,7 +87,7 @@ export const basemapsCreateMapSheet = command({ const mem = ConfigProviderMemory.fromJson(configJson); const rest = fgb.deserialize(buf) as FeatureCollection; - const featuresWritePromise = fsa.write(new URL('file://features.json'), JSON.stringify(rest)); + const featuresWritePromise = fsa.write(new URL(`file://${process.cwd()}/features.json`), JSON.stringify(rest)); const aerial = await mem.TileSet.get('ts_aerial'); if (aerial == null) throw new Error('Invalid config file.');