File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/core/src/shared/vscode Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { onceChanged } from '../utilities/functionUtils'
1111import { ChildProcess } from '../utilities/processUtils'
1212import globals , { isWeb } from '../extensionGlobals'
1313import * as devConfig from '../../dev/config'
14+ import * as os from 'os'
1415
1516/**
1617 * Returns true if the current build is running on CI (build server).
@@ -245,9 +246,12 @@ export function isAmazonLinux2() {
245246 getLogger ( ) . error ( `Checking os-release files failed: ${ e } ` )
246247 }
247248
248- // If no os-release files found or all failed to parse, assume not AL2
249- // We do NOT fall back to kernel version as it reflects host OS, not container OS
250- return false
249+ // Fall back to kernel version check if os-release files are unavailable or failed
250+ // This is needed for environments where os-release might not be accessible
251+ const kernelRelease = os . release ( )
252+ const hasAL2Kernel = kernelRelease . includes ( '.amzn2int.' ) || kernelRelease . includes ( '.amzn2.' )
253+
254+ return hasAL2Kernel
251255}
252256
253257/**
You can’t perform that action at this time.
0 commit comments