Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
Fix #8
Browse files Browse the repository at this point in the history
Simple copy-and-paste code error resulted in an empty "IsPrerelease" field.
choco.exe rejects this without a clear error message, but instead with
trying to get the same package with a new version, appending ".0" to the old one.
If this fails it states, that the package does not exist.

Tagging new version 1.0.2
  • Loading branch information
Victor Brekenfeld committed Dec 6, 2016
1 parent b95e0ca commit a362250
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hazel"
description = "A Chocolatey-compatible multi-platform Package Server written in Rust"
version = "1.0.1"
version = "1.0.2"
authors = ["Victor Brekenfeld <[email protected]>"]
build = "build.rs"
homepage = "https://github.com/MPIB/hazel"
Expand Down
2 changes: 1 addition & 1 deletion src/web/backend/xml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl ToNugetFeedXml for PackageVersion

let mut is_prerelease = Element::new("d:IsPrerelease");
is_prerelease.attributes.insert(String::from("m:type"), String::from("Edm.Boolean"));
is_absolute_latest_version.text = Some(String::from(
is_prerelease.text = Some(String::from(
match self.version().is_prerelease() {
true => "true",
false => "false",
Expand Down
2 changes: 1 addition & 1 deletion src/web/views/api/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn package(req: &mut Request) -> IronResult<Response> {

let package = match PackageVersion::get(&*connection, id, &match Version::parse(version) {
Ok(ver) => ver,
Err(_) => return Ok(Response::with((status::BadRequest, "Version value invalid"))),
Err(_) => return Ok(Response::with((status::NotFound, "Version value invalid"))),
}) {
Ok(package) => package,
Err(_) => {
Expand Down

0 comments on commit a362250

Please sign in to comment.