Skip to content

Commit

Permalink
Merge pull request #65 from thesoftwarejedi/patch-1
Browse files Browse the repository at this point in the history
Fixed incorrect error message in package version resolver.
  • Loading branch information
hnrkndrssn committed Dec 16, 2015
2 parents e027b0d + d62c058 commit a281d81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/OctopusTools/Commands/PackageVersionResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public void Add(string stepNameAndVersion)
{
var index = new[] {':', '='}.Select(s => stepNameAndVersion.IndexOf(s)).Where(i => i >= 0).OrderBy(i => i).FirstOrDefault();
if (index <= 0)
throw new CommandException("The package argument '" + stepNameAndVersion + "' does not use expected format of : {PackageId}:{Version}");
throw new CommandException("The package argument '" + stepNameAndVersion + "' does not use expected format of : {Step Name}:{Version}");

var key = stepNameAndVersion.Substring(0, index);
var value = (index >= stepNameAndVersion.Length - 1) ? string.Empty : stepNameAndVersion.Substring(index + 1);

if (string.IsNullOrWhiteSpace(key) || string.IsNullOrWhiteSpace(value))
{
throw new CommandException("The package argument '" + stepNameAndVersion + "' does not use expected format of : {PackageId}:{Version}");
throw new CommandException("The package argument '" + stepNameAndVersion + "' does not use expected format of : {Step Name}:{Version}");
}

SemanticVersion version;
Expand Down Expand Up @@ -83,4 +83,4 @@ public string ResolveVersion(string stepName)
: defaultVersion;
}
}
}
}

0 comments on commit a281d81

Please sign in to comment.