Skip to content

Commit

Permalink
fixed path and more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
imunproductive committed Aug 10, 2024
1 parent 9f4bc41 commit 300047d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ runs:
working-directory: ${{ github.action_path }}/src
shell: cmd
run: dotnet run
env: # github what the fuck
env:
INPUT_USERNAME: ${{ inputs.username }}
INPUT_PASSWORD: ${{ inputs.password }}
INPUT_FILE_CLIENT_SETTINGS_CONTENT: ${{ secrets.FILE_CLIENT_SETTINGS_CONTENT }}
INPUT_FILE_PRIVATE_SETTINGS_CONTENT: ${{ secrets.FILE_PRIVATE_SETTINGS_CONTENT }}
INPUT_FILE_COOKIES_CONTENT: ${{ secrets.FILE_COOKIES_CONTENT }}
INPUT_REGION: ${{ inputs.region }}
INPUT_PATCHLINE: ${{ inputs.patchline }}
INPUT_CONFIG: ${{ inputs.config }}
Expand Down
3 changes: 2 additions & 1 deletion src/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ async Task<string> GetRiotClientPath()
async Task DecodeAndWrite(string path, string data)
{
var decoded = Convert.FromBase64String(data);
logger.LogDebug($"Writing to \"{path}\" ({data.Length} -> {decoded.Length})");
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
await File.WriteAllBytesAsync(path, decoded);
}
Expand All @@ -120,7 +121,7 @@ async Task DecodeAndWrite(string path, string data)
var tasks = new List<Task>() {
DecodeAndWrite(Path.Join(basePath, "Config", "RiotClientSettings.yaml"), core.GetInput("FILE_CLIENT_SETTINGS_CONTENT")),
DecodeAndWrite(Path.Join(basePath, "Data", "RiotGamesPrivateSettings.yaml"), core.GetInput("FILE_PRIVATE_SETTINGS_CONTENT")),
DecodeAndWrite(Path.Join(basePath, "Config", "Cookies", "Cookie"), core.GetInput("FILE_COOKIES_CONTENT")),
DecodeAndWrite(Path.Join(basePath, "Config", "Cookies", "Cookies"), core.GetInput("FILE_COOKIES_CONTENT")),
};

await Task.WhenAll(tasks);
Expand Down

0 comments on commit 300047d

Please sign in to comment.