Skip to content

Commit 3ce4260

Browse files
committed
Merge branch 'hotfix/0.12.3'
2 parents 08dedac + a06d67e commit 3ce4260

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [vNext]
88

9+
## [0.12.4] / 2018-12-02
10+
- Fixed `SolutionAttribute` to handle empty configuration file
11+
912
## [0.12.3] / 2018-11-29
1013
- Fixed `EnvironmentInfo.Variables` not to be cached
1114
- Fixed `Glob` package reference in legacy template
@@ -216,7 +219,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
216219
- Added CLT tasks for Git
217220
- Fixed background color in console output
218221

219-
[vNext]: https://github.com/nuke-build/nuke/compare/0.12.3...HEAD
222+
[vNext]: https://github.com/nuke-build/nuke/compare/0.12.4...HEAD
223+
[0.12.4]: https://github.com/nuke-build/nuke/compare/0.12.3...0.12.4
220224
[0.12.3]: https://github.com/nuke-build/nuke/compare/0.12.2...0.12.3
221225
[0.12.2]: https://github.com/nuke-build/nuke/compare/0.12.1...0.12.2
222226
[0.12.1]: https://github.com/nuke-build/nuke/compare/0.12.0...0.12.1

source/Nuke.Common/ProjectModel/SolutionAttribute.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ private string GetSolutionFile(string memberName)
8484
private string GetSolutionFileFromConfigurationFile()
8585
{
8686
var nukeFile = Path.Combine(NukeBuild.RootDirectory, NukeBuild.ConfigurationFileName);
87-
ControlFlow.Assert(File.Exists(nukeFile), $"File.Exists({NukeBuild.ConfigurationFileName})");
87+
ControlFlow.Assert(File.Exists(nukeFile), $"File.Exists({nukeFile})");
8888

89-
var solutionFileRelative = File.ReadAllLines(nukeFile)[0];
90-
ControlFlow.Assert(!solutionFileRelative.Contains(value: '\\'), $"{NukeBuild.ConfigurationFileName} must use unix-styled separators");
89+
var solutionFileRelative = File.ReadAllLines(nukeFile).ElementAtOrDefault(0);
90+
ControlFlow.Assert(solutionFileRelative != null && !solutionFileRelative.Contains(value: '\\'),
91+
$"First line of {NukeBuild.ConfigurationFileName} must provide solution path using UNIX separators");
9192

9293
var solutionFile = Path.GetFullPath(Path.Combine(NukeBuild.RootDirectory, solutionFileRelative));
93-
ControlFlow.Assert(File.Exists(solutionFile), $"Solution file '{solutionFile}' does not exist.");
94+
ControlFlow.Assert(File.Exists(solutionFile),
95+
$"Solution file '{solutionFile}' provided via {NukeBuild.CompletionFileName} does not exist.");
9496

9597
return (PathConstruction.AbsolutePath) solutionFile;
9698
}

0 commit comments

Comments
 (0)