(source: PermissionRuleSource)
| 744 | } |
| 745 | |
| 746 | function rootPathForSource(source: PermissionRuleSource): string { |
| 747 | switch (source) { |
| 748 | case 'cliArg': |
| 749 | case 'command': |
| 750 | case 'session': |
| 751 | return expandPath(getOriginalCwd()) |
| 752 | case 'userSettings': |
| 753 | case 'policySettings': |
| 754 | case 'projectSettings': |
| 755 | case 'localSettings': |
| 756 | case 'flagSettings': |
| 757 | return getSettingsRootPathForSource(source) |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | function prependDirSep(path: string): string { |
| 762 | return posix.join(DIR_SEP, path) |
no test coverage detected