mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-06 06:41:56 +00:00
fix(cli): preserve invoked cwd for local launcher (#299)
This commit is contained in:
@@ -10,6 +10,7 @@ import type { Update, UpdateMachineBody } from '@hapi/protocol'
|
||||
import type { RunnerState, Machine, MachineMetadata } from './types'
|
||||
import { RunnerStateSchema, MachineMetadataSchema } from './types'
|
||||
import { backoff } from '@/utils/time'
|
||||
import { getInvokedCwd } from '@/utils/invokedCwd'
|
||||
import { RpcHandlerManager } from './rpc/RpcHandlerManager'
|
||||
import { registerCommonHandlers } from '../modules/common/registerCommonHandlers'
|
||||
import type { SpawnSessionOptions, SpawnSessionResult } from '../modules/common/rpcTypes'
|
||||
@@ -77,7 +78,7 @@ export class ApiMachineClient {
|
||||
logger: (msg, data) => logger.debug(msg, data)
|
||||
})
|
||||
|
||||
registerCommonHandlers(this.rpcHandlerManager, process.cwd())
|
||||
registerCommonHandlers(this.rpcHandlerManager, getInvokedCwd())
|
||||
|
||||
this.rpcHandlerManager.registerHandler<PathExistsRequest, PathExistsResponse>('path-exists', async (params) => {
|
||||
const rawPaths = Array.isArray(params?.paths) ? params.paths : []
|
||||
|
||||
Reference in New Issue
Block a user