( env: CliEnv = getCliEnv(), )
| 206 | } |
| 207 | |
| 208 | const resolveVSCodeSettingsPaths = ( |
| 209 | env: CliEnv = getCliEnv(), |
| 210 | ): string[] => { |
| 211 | const settings: string[] = [] |
| 212 | const home = homedir() |
| 213 | |
| 214 | if (process.platform === 'darwin') { |
| 215 | const base = join(home, 'Library', 'Application Support') |
| 216 | for (const product of VS_CODE_PRODUCT_DIRS) { |
| 217 | settings.push(join(base, product, 'User', 'settings.json')) |
| 218 | } |
| 219 | } else if (process.platform === 'win32') { |
| 220 | const appData = env.APPDATA |
| 221 | if (appData) { |
| 222 | for (const product of VS_CODE_PRODUCT_DIRS) { |
| 223 | settings.push(join(appData, product, 'User', 'settings.json')) |
| 224 | } |
| 225 | } |
| 226 | } else { |
| 227 | const configDir = env.XDG_CONFIG_HOME ?? join(home, '.config') |
| 228 | for (const product of VS_CODE_PRODUCT_DIRS) { |
| 229 | settings.push(join(configDir, product, 'User', 'settings.json')) |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | return settings |
| 234 | } |
| 235 | |
| 236 | const resolveJetBrainsLafPaths = ( |
| 237 | env: CliEnv = getCliEnv(), |
no test coverage detected