( source: SettingSource, )
| 357 | } |
| 358 | |
| 359 | function getSettingsWriteFilePathForSource( |
| 360 | source: SettingSource, |
| 361 | ): string | undefined { |
| 362 | switch (source) { |
| 363 | case 'userSettings': |
| 364 | return getCanonicalUserSettingsFilePath() |
| 365 | case 'projectSettings': |
| 366 | case 'localSettings': |
| 367 | return join( |
| 368 | resolve(getOriginalCwd()), |
| 369 | getCanonicalRelativeSettingsFilePathForSource(source), |
| 370 | ) |
| 371 | case 'policySettings': |
| 372 | return getManagedSettingsFilePath() |
| 373 | case 'flagSettings': |
| 374 | return getFlagSettingsPath() |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | export function getSettingsFilePathForSource(source: SettingSource): string | undefined { |
| 379 | const candidates = getSettingsReadCandidatePathsForSource(source) |
no test coverage detected