Skip to content

Commit

Permalink
fix: hidden path issue on Mac (#118)
Browse files Browse the repository at this point in the history
Co-authored-by: deler <[email protected]>
  • Loading branch information
deler-aziz and deler authored Aug 13, 2024
1 parent 919d1d5 commit f7cc6dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Husky/TaskRunner/HuskyTaskLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using Husky.Services.Contracts;
using Husky.Stdout;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.FileProviders.Physical;

namespace Husky.TaskRunner;

Expand Down Expand Up @@ -32,11 +34,12 @@ public async Task LoadAsync()
var gitPath = await _git.GetGitPathAsync();
var huskyPath = await _git.GetHuskyPathAsync();
Tasks = new List<HuskyTask>();
var dir = Path.Combine(gitPath, huskyPath, "task-runner.json");
var dir = Path.Combine(gitPath, huskyPath);
try
{
var config = new ConfigurationBuilder()
.AddJsonFile(dir)
.SetFileProvider(new PhysicalFileProvider(dir, ExclusionFilters.None))
.AddJsonFile("task-runner.json")
.Build();
config.GetSection("tasks").Bind(Tasks);
OverrideWindowsSpecifics();
Expand Down

0 comments on commit f7cc6dd

Please sign in to comment.