Skip to content

Commit 1464b57

Browse files
committed
Fixed issue when global.json does not exist.
1 parent 34ed729 commit 1464b57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PostSharp.Engineering.BuildTools/Build/BuildContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ public static bool TryCreate(
125125
{
126126
if ( Directory.Exists( Path.Combine( directory, ".git" ) ) )
127127
{
128-
var globalJson = Path.Combine( directory, "global.json" );
128+
var gitIgnorePath = Path.Combine( directory, ".gitignore" );
129129

130-
if ( !File.Exists( globalJson ) )
130+
if ( !File.Exists( gitIgnorePath ) )
131131
{
132-
throw new FileNotFoundException( $"The file '{globalJson}' must exist, even empty." );
132+
throw new FileNotFoundException( $"The file '{gitIgnorePath}' must exist, even empty." );
133133
}
134134

135135
// Resolve links and junctions.
136-
var realPath = FileSystemHelper.GetFinalPath( globalJson );
136+
var realPath = FileSystemHelper.GetFinalPath( gitIgnorePath );
137137

138138
return Path.GetDirectoryName( realPath );
139139
}

0 commit comments

Comments
 (0)