Skip to content

Commit 947baa4

Browse files
authored
* Fixes up paths for GitLab subgroups (#326)
1 parent b4bac8e commit 947baa4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

buckaroo/InstallCommand.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,20 @@ let rec computeCellIdentifier (parents : PackageIdentifier list) (package : Pack
145145
| head::tail ->
146146
(computeCellIdentifier tail head) + "." + (computeCellIdentifier [] package)
147147

148+
let rec private combinePaths xs =
149+
match xs with
150+
| [ x ] -> x
151+
| x::xs -> Path.Combine (x, combinePaths xs)
152+
| [] -> ""
153+
148154
let rec packageInstallPath (parents : PackageIdentifier list) (package : PackageIdentifier) =
149155
match parents with
150156
| [] ->
151157
let (prefix, owner, project) =
152158
match package with
153159
| PackageIdentifier.GitHub x -> ("github", x.Owner, x.Project)
154160
| PackageIdentifier.BitBucket x -> ("bitbucket", x.Owner, x.Project)
155-
| PackageIdentifier.GitLab x -> ("gitlab", (x.Groups |> String.concat "."), x.Project)
161+
| PackageIdentifier.GitLab x -> ("gitlab", combinePaths x.Groups, x.Project)
156162
| PackageIdentifier.Adhoc x -> ("adhoc", x.Owner, x.Project)
157163
Path.Combine(".", Constants.PackagesDirectory, prefix, owner, project)
158164
| head::tail ->

0 commit comments

Comments
 (0)