fix(omp): use guest profile root for WSL launches

This commit is contained in:
Neil
2026-09-19 00:33:15 -07:00
parent b92fd9bf05
commit e054935f7b
+9 -3
View File
@@ -161,9 +161,15 @@ export function buildPtyHostEnv(
if (shouldPrepareOmpShadow) {
const ompEnv = piTitlebarExtensionService.buildPtyEnv(id, preexistingOmpAgentDir, 'omp', {
materializeDefaultHome: explicitPiAgentKind === 'omp',
...(baseEnv.PI_CONFIG_DIR !== undefined && !opts.isWsl
? { configDirName: baseEnv.PI_CONFIG_DIR }
: {})
// WSL executes on the guest and must never inherit the host's
// PI_CONFIG_DIR. Use OMP's guest-local default when the relay has
// not supplied a guest root yet; the relay may still override the
// resulting source directory with its materialized guest path.
...(opts.isWsl
? { configDirName: '.omp' }
: baseEnv.PI_CONFIG_DIR !== undefined
? { configDirName: baseEnv.PI_CONFIG_DIR }
: {})
})
Object.assign(baseEnv, ompEnv)
exposePiManagedExtensionEnv(baseEnv, 'omp', ompEnv)