mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 00:03:15 +01:00
Format lib/cso with prettier
This commit is contained in:
1 parent
b44886a496
commit
f054927ee3
3 files changed
+14
-3
No files matched your search
+4
-1
@@ -2242,7 +2242,10 @@ async function verify(args: string[], dependencies: CsoCliDependencies) {
|
||||
writeJson(join(dir, `preparation-${runtime.stack}.json`), plan);
|
||||
const endpoint = await dockerEndpoint(secureDirectory(join(dir, 'home'))),
|
||||
watchdogPath = dependencies.watchdogPath(),
|
||||
attemptDeadline = Math.min(Date.now() + verificationAttemptMs(runtime.stack), Date.parse(report.deadline) - 60_000);
|
||||
attemptDeadline = Math.min(
|
||||
Date.now() + verificationAttemptMs(runtime.stack),
|
||||
Date.parse(report.deadline) - 60_000,
|
||||
);
|
||||
const admission = admitPreparationRuntime({
|
||||
plan,
|
||||
platform: targetPlatform,
|
||||
|
||||
@@ -542,7 +542,12 @@ function inspectPython(root: string, plan: PreparationPlan) {
|
||||
// py_compile reads SOURCE_DATE_EPOCH from os.environ even under `python -I` and then writes
|
||||
// checked-hash .pyc files. venv/ensurepip and pip compile bytecode during offline preparation; with
|
||||
// timestamp .pyc files every preparation differed, so a replay could never match its verification.
|
||||
const offlineEnv = { ...acquisitionEnv, UV_CACHE_DIR: '/work/.cso-uv-cache', UV_LINK_MODE: 'copy', SOURCE_DATE_EPOCH: '315532800' };
|
||||
const offlineEnv = {
|
||||
...acquisitionEnv,
|
||||
UV_CACHE_DIR: '/work/.cso-uv-cache',
|
||||
UV_LINK_MODE: 'copy',
|
||||
SOURCE_DATE_EPOCH: '315532800',
|
||||
};
|
||||
let requirementsPath = 'requirements.txt';
|
||||
let publicRequirements = '/metadata/requirements.txt';
|
||||
const localBuildPaths: string[] = [];
|
||||
|
||||
@@ -1899,7 +1899,10 @@ export async function verifyRepair(params: {
|
||||
}
|
||||
let guardedCleanup: (() => Promise<void>) | undefined;
|
||||
if (params.watchdogPath) {
|
||||
const deadline = Math.min(params.attemptDeadline ?? Date.now() + 300_000, Date.now() + MAX_VERIFICATION_ATTEMPT_MS);
|
||||
const deadline = Math.min(
|
||||
params.attemptDeadline ?? Date.now() + 300_000,
|
||||
Date.now() + MAX_VERIFICATION_ATTEMPT_MS,
|
||||
);
|
||||
guardedCleanup = await attemptGuard(params.runDir, work, params.watchdogPath, deadline);
|
||||
}
|
||||
secureDirectory(observations);
|
||||
|
||||
Reference in new issue
Block a user