@@ -19,6 +19,7 @@ import type { ActionConfig } from "./config/action-config";
1919import { appendExtraQueryExclusions , type Config } from "./config-utils" ;
2020import { DocUrl } from "./doc-url" ;
2121import { EnvVar , getEnv , exportEnvVar } from "./environment" ;
22+ import { getErrorMessage , isDiskConfigurationError } from "./errors" ;
2223import {
2324 CodeQLDefaultVersionInfo ,
2425 Feature ,
@@ -34,7 +35,9 @@ import { ToolsDownloadStatusReport } from "./tools-download";
3435import { ToolsFeature , isSupportedToolsFeature } from "./tools-features" ;
3536import { shouldEnableIndirectTracing } from "./tracer-config" ;
3637import * as util from "./util" ;
37- import { BuildMode , CleanupLevel , getErrorMessage } from "./util" ;
38+ import { BuildMode , CleanupLevel } from "./util" ;
39+
40+ export { isDiskConfigurationError } from "./errors" ;
3841
3942type Options = Array < string | number | boolean > ;
4043
@@ -274,26 +277,6 @@ const GHES_MOST_RECENT_DEPRECATION_DATE = "2026-09-24";
274277/** The CLI verbosity level to use for extraction in debug mode. */
275278const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++" ;
276279
277- /**
278- * Decides whether `e` is a disk-related error outside of our control
279- * that should be classified as a `ConfigurationError`.
280- *
281- * @param e The error to check.
282- * @returns True if the error should be treated as a `ConfigurationError` or false if not.
283- */
284- export function isDiskConfigurationError ( e : unknown ) : boolean {
285- if ( ! ( e instanceof Error ) ) {
286- return false ;
287- }
288-
289- return (
290- // out of disk space
291- e . message . includes ( "ENOSPC" ) ||
292- // access denied
293- e . message . includes ( "EACCES" )
294- ) ;
295- }
296-
297280/**
298281 * Set up CodeQL CLI access.
299282 *
0 commit comments