fix(tools/magrathea): prevent trailing slash for // in path
All targets would have no trailing slash, so it was at least ugly that // had one as the only legal target. Change-Id: I1b60850ac86d8c550f262841694fb00c518413b8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4404 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
4c07a97af3
commit
3090f61713
1 changed files with 7 additions and 6 deletions
|
@ -246,12 +246,13 @@ USAGE
|
||||||
(define (path args)
|
(define (path args)
|
||||||
(match args
|
(match args
|
||||||
[(arg)
|
[(arg)
|
||||||
(print (conc (repository-root)
|
(print (apply string-append
|
||||||
"/"
|
(intersperse
|
||||||
(string-intersperse
|
(cons (repository-root)
|
||||||
(target-components
|
(target-components
|
||||||
(normalise-target
|
(normalise-target
|
||||||
(guarantee-success (parse-target arg)))) "/")))]
|
(guarantee-success (parse-target arg)))))
|
||||||
|
"/")))]
|
||||||
[() (mg-error "path command needs a target")]
|
[() (mg-error "path command needs a target")]
|
||||||
[other (mg-error (format "unknown arguments: ~a" other))]))
|
[other (mg-error (format "unknown arguments: ~a" other))]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue