ci: fix path bugs on windows (#726)
This commit is contained in:
1 parent
e371594944
commit
757445df0a
2 files changed
+9
-1
No files matched your search
+6
-1
@@ -6,7 +6,12 @@ import userStylesSchema from "@/userstyles.schema.json" with {
|
|||||||
};
|
};
|
||||||
|
|
||||||
import { join } from "std/path/mod.ts";
|
import { join } from "std/path/mod.ts";
|
||||||
const ROOT = new URL(".", import.meta.url).pathname;
|
|
||||||
|
const ROOT = import.meta.dirname;
|
||||||
|
if (!ROOT) {
|
||||||
|
throw new Error("ROOT was not located.");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* absolute path to the repository
|
* absolute path to the repository
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ export const verifyMetadata = async (
|
|||||||
userstyle: string,
|
userstyle: string,
|
||||||
userstyles: Userstyles,
|
userstyles: Userstyles,
|
||||||
) => {
|
) => {
|
||||||
|
// `usercss-meta` prohibits any '\r' characters, which seem to be present on Windows.
|
||||||
|
content = content.replaceAll("\r\n", "\n");
|
||||||
|
|
||||||
const assert = assertions(userstyle, userstyles);
|
const assert = assertions(userstyle, userstyles);
|
||||||
const file = relative(REPO_ROOT, entry.path);
|
const file = relative(REPO_ROOT, entry.path);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user