Merge branch 'package-creation-fix' of pztrn/giredore into master

This commit is contained in:
Stanislav Nikitin 2019-10-21 23:15:56 +00:00 committed by Gitea
commit c910f12eae

View File

@ -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"