chore: delete the unnecessary functions called

This commit is contained in:
YewFence
2026-03-29 02:16:41 +08:00
committed by jarek
parent 94657735fb
commit a1def17750
2 changed files with 0 additions and 9 deletions
-5
View File
@@ -17,7 +17,6 @@ import {
import { getEnvironment, getEnvSetting, getSetting } from './db'; import { getEnvironment, getEnvSetting, getSetting } from './db';
import { sendEventNotification } from './notifications'; import { sendEventNotification } from './notifications';
import { import {
detectHostDataDir,
getHostDockerSocket, getHostDockerSocket,
getHostDataDir, getHostDataDir,
extractUidFromSocketPath, extractUidFromSocketPath,
@@ -618,10 +617,6 @@ async function runScannerContainerCore(
): Promise<string> { ): Promise<string> {
console.log(`[Scanner] Starting ${scannerType} scan for image: ${imageName}, envId: ${envId ?? 'local'}`); console.log(`[Scanner] Starting ${scannerType} scan for image: ${imageName}, envId: ${envId ?? 'local'}`);
// Ensure startup inspect caches are populated before we mirror Dockhand's own
// Docker access settings into sibling sidecars.
await detectHostDataDir().catch(() => null);
// Always use the base cache path — serial lock prevents concurrent conflicts // Always use the base cache path — serial lock prevents concurrent conflicts
const basePath = scannerType === 'grype' ? '/cache/grype' : '/cache/trivy'; const basePath = scannerType === 'grype' ? '/cache/grype' : '/cache/trivy';
const dbPath = basePath; const dbPath = basePath;
-4
View File
@@ -1,7 +1,6 @@
import { json } from '@sveltejs/kit'; import { json } from '@sveltejs/kit';
import { authorize } from '$lib/server/authorize'; import { authorize } from '$lib/server/authorize';
import { import {
detectHostDataDir,
getOwnContainerId, getOwnContainerId,
getHostDockerSocket, getHostDockerSocket,
getOwnDockerHost, getOwnDockerHost,
@@ -262,9 +261,6 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
return json({ error: 'Not running in Docker' }, { status: 400 }); return json({ error: 'Not running in Docker' }, { status: 400 });
} }
// Populate cached inspect data used to mirror Dockhand's own sidecar settings.
await detectHostDataDir().catch(() => null);
const writable = await isDockerWritable(containerId); const writable = await isDockerWritable(containerId);
if (!writable) { if (!writable) {
return json({ return json({