mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix build failing on non-windows platforms
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
c4d56ef1a7
commit
786e0e8ac9
@ -10,6 +10,7 @@ import path from "path";
|
||||
import sharp from "sharp";
|
||||
import arg from "arg";
|
||||
import assert from "assert";
|
||||
import { platform } from "process";
|
||||
|
||||
const options = arg({
|
||||
"--input": String,
|
||||
@ -45,7 +46,11 @@ const joinWithInitCwd = (relativePath: string): string => {
|
||||
const resolve = async (input: string) => {
|
||||
const filePath = await import.meta.resolve?.(input);
|
||||
|
||||
return filePath?.replace("file:///", "");
|
||||
if (platform === "win32") {
|
||||
return filePath?.replace("file:///", "");
|
||||
} else {
|
||||
return filePath?.replace("file://", "");
|
||||
}
|
||||
}
|
||||
|
||||
const size = options["--output-size"] ?? 16;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user