(raw: string | undefined, options: ResolveDaemonPathsOptions)
| 40 | } |
| 41 | |
| 42 | function resolveStateDir(raw: string | undefined, options: ResolveDaemonPathsOptions): string { |
| 43 | const value = (raw ?? '').trim(); |
| 44 | if (!value) { |
| 45 | return resolveDefaultDaemonStateDir(options); |
| 46 | } |
| 47 | return resolveUserPath(value, { env: options.env }); |
| 48 | } |
| 49 | |
| 50 | function resolveDefaultDaemonStateDir(options: ResolveDaemonPathsOptions = {}): string { |
| 51 | const globalStateDir = path.join(expandUserHomePath('~', { env: options.env }), '.agent-device'); |
no test coverage detected