+4
-3
cmd/repoguard/main.go
+4
-3
cmd/repoguard/main.go
···
66
gitCommand := cmdParts[0]
67
68
// did:foo/repo-name or
69
-
// handle/repo-name
70
71
-
components := strings.Split(strings.Trim(cmdParts[1], "'"), "/")
72
logEvent("Command components", map[string]interface{}{
73
"components": components,
74
})
75
if len(components) != 2 {
76
-
exitWithLog("invalid repo format, needs <user>/<repo>")
77
}
78
79
didOrHandle := components[0]
···
66
gitCommand := cmdParts[0]
67
68
// did:foo/repo-name or
69
+
// handle/repo-name or
70
+
// any of the above with a leading slash (/)
71
72
+
components := strings.Split(strings.TrimPrefix(strings.Trim(cmdParts[1], "'"), "/"), "/")
73
logEvent("Command components", map[string]interface{}{
74
"components": components,
75
})
76
if len(components) != 2 {
77
+
exitWithLog("invalid repo format, needs <user>/<repo> or /<user>/<repo>")
78
}
79
80
didOrHandle := components[0]
+1
flake.nix
+1
flake.nix
···
152
shellHook = ''
153
cp -f ${htmx-src} appview/pages/static/htmx.min.js
154
cp -f ${lucide-src} appview/pages/static/lucide.min.js
155
cp -f ${ia-fonts-src}/"iA Writer Quattro"/Static/*.ttf appview/pages/static/fonts/
156
cp -f ${ia-fonts-src}/"iA Writer Mono"/Static/*.ttf appview/pages/static/fonts/
157
'';
···
152
shellHook = ''
153
cp -f ${htmx-src} appview/pages/static/htmx.min.js
154
cp -f ${lucide-src} appview/pages/static/lucide.min.js
155
+
mkdir -p appview/pages/static/fonts/
156
cp -f ${ia-fonts-src}/"iA Writer Quattro"/Static/*.ttf appview/pages/static/fonts/
157
cp -f ${ia-fonts-src}/"iA Writer Mono"/Static/*.ttf appview/pages/static/fonts/
158
'';