MCPcopy
hub / github.com/codeaashu/claude-code / formatPermissionSource

Function formatPermissionSource

src/utils/permissions/permissionSetup.ts:247–256  ·  view source on GitHub ↗
(source: PermissionRuleSource)

Source from the content-addressed store, hash-verified

245}
246
247function formatPermissionSource(source: PermissionRuleSource): string {
248 if ((SETTING_SOURCES as readonly string[]).includes(source)) {
249 const filePath = getSettingsFilePathForSource(source as SettingSource)
250 if (filePath) {
251 const relativePath = relative(getCwd(), filePath)
252 return relativePath.length < filePath.length ? relativePath : filePath
253 }
254 }
255 return source
256}
257
258export type DangerousPermissionInfo = {
259 ruleValue: PermissionRuleValue

Calls 2

getCwdFunction · 0.85

Tested by

no test coverage detected