Ensure that leading slash is added to package's original path. Fixes #18.
This commit is contained in:
parent
5acc64de59
commit
68ad99b767
@ -56,6 +56,12 @@ func SetPackage(args []string, options map[string]string) {
|
|||||||
VCS: args[3],
|
VCS: args[3],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Execute some necessary checks.
|
||||||
|
// If package's original path isn't starting with "/" - add it.
|
||||||
|
if !strings.HasPrefix(pkg.OriginalPath, "/") {
|
||||||
|
pkg.OriginalPath = "/" + pkg.OriginalPath
|
||||||
|
}
|
||||||
|
|
||||||
log.Info().Str("description", pkg.Description).Str("original path", pkg.OriginalPath).Str("real path", pkg.RealPath).Str("VCS", pkg.VCS).Msg("Sending set/update request to giredored...")
|
log.Info().Str("description", pkg.Description).Str("original path", pkg.OriginalPath).Str("real path", pkg.RealPath).Str("VCS", pkg.VCS).Msg("Sending set/update request to giredored...")
|
||||||
|
|
||||||
url := "http://" + options["server"] + "/_api/packages"
|
url := "http://" + options["server"] + "/_api/packages"
|
||||||
|
Loading…
Reference in New Issue
Block a user