(source: PermissionRuleSource)
| 754 | } |
| 755 | |
| 756 | function rootPathForSource(source: PermissionRuleSource): string { |
| 757 | switch (source) { |
| 758 | case 'cliArg': |
| 759 | case 'command': |
| 760 | case 'session': |
| 761 | return expandPath(getOriginalCwd()) |
| 762 | case 'userSettings': |
| 763 | case 'policySettings': |
| 764 | case 'projectSettings': |
| 765 | case 'localSettings': |
| 766 | case 'flagSettings': |
| 767 | return getSettingsRootPathForSource(source) |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | function prependDirSep(path: string): string { |
| 772 | return posix.join(DIR_SEP, path) |
no test coverage detected