()
| 14 | // Check if running from a build directory (development mode) |
| 15 | // This is a sync version of the logic in getCurrentInstallationType() |
| 16 | function isRunningFromBuildDirectory(): boolean { |
| 17 | let invokedPath = process.argv[1] || '' |
| 18 | let execPath = process.execPath || process.argv[0] || '' |
| 19 | |
| 20 | // On Windows, convert backslashes to forward slashes for consistent path matching |
| 21 | if (getPlatform() === 'windows') { |
| 22 | invokedPath = invokedPath.split(win32.sep).join(posix.sep) |
| 23 | execPath = execPath.split(win32.sep).join(posix.sep) |
| 24 | } |
| 25 | |
| 26 | const pathsToCheck = [invokedPath, execPath] |
| 27 | const buildDirs = [ |
| 28 | '/build-ant/', |
| 29 | '/build-external/', |
| 30 | '/build-external-native/', |
| 31 | '/build-ant-native/', |
| 32 | ] |
| 33 | |
| 34 | return pathsToCheck.some(path => buildDirs.some(dir => path.includes(dir))) |
| 35 | } |
| 36 | |
| 37 | // Warnings we know about and want to suppress from users |
| 38 | const INTERNAL_WARNINGS = [ |
no test coverage detected