Skip to content

Commit

Permalink
added compatibility with GITHUB_WORKSPACE folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik518 committed Oct 21, 2023
1 parent 2101c46 commit f627085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SoG_SGreader.Test/DataReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ private static Player GetSaveGame(int saveGameNumber)
DataReader dataReader = new DataReader();
var txtConsoleMock = new Mock<ITextBoxWrapper>().Object;

string projectDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.FullName;
string projectDirectory = Environment.GetEnvironmentVariable("GITHUB_WORKSPACE") ?? Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.FullName;
string filePath = Path.Combine(projectDirectory, "SaveGames", saveGameNumber + ".cha");

return dataReader.ReadFromFile(filePath, txtConsoleMock);
Expand Down

0 comments on commit f627085

Please sign in to comment.