Create CET-6 90-day check-in site
This commit is contained in:
commit
5c63f9f120
109 files changed
+19290
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
export function readExecutionProfile() {
|
||||
let settings;
|
||||
try {
|
||||
settings = JSON.parse(readFileSync(new URL("../.sites-runtime/execution-profile.json", import.meta.url), "utf8"));
|
||||
} catch (error) {
|
||||
// Clean clones and remote builds have no checkout-local selection.
|
||||
if (error.code === "ENOENT") return "portable";
|
||||
throw error;
|
||||
}
|
||||
if (!["managed-linux", "portable"].includes(settings?.executionProfile)) {
|
||||
throw new Error("Invalid local execution profile; rerun the Sites plugin's configure-execution-profile.mjs.");
|
||||
}
|
||||
return settings.executionProfile;
|
||||
}
|
||||
Reference in new issue
Block a user