Skip to content

Commit

Permalink
fix: ReStage with spaces (#111)
Browse files Browse the repository at this point in the history
* fix: reStage with spaces

* build: bump to v0.6.5
  • Loading branch information
alirezanet authored May 10, 2024
1 parent 8ebe1c8 commit 3fe3449
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/configs/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version: string = '0.6.4'
export const version: string = '0.6.5'
2 changes: 1 addition & 1 deletion src/Husky/Husky.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<PackageId>Husky</PackageId>
<Version>0.6.4</Version>
<Version>0.6.5</Version>
<Title>Husky</Title>
<Authors>AliReza Sabouri</Authors>
<Description>Git hooks made easy, woof!</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/Husky/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// initialize CLI
exitCode = await new CliApplicationBuilder()
.AddCommandsFromThisAssembly()
.UseTypeActivator(BuildServiceProvider().GetService)
.UseTypeActivator(BuildServiceProvider().GetService!)
.SetExecutableName("husky")
.Build()
.RunAsync(args);
Expand Down
4 changes: 3 additions & 1 deletion src/Husky/TaskRunner/StagedTask.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO.Abstractions;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using CliFx.Exceptions;
using Husky.Services.Contracts;
Expand Down Expand Up @@ -142,8 +143,9 @@ private async Task ReStageFiles(IEnumerable<FileArgumentInfo> partialStagedFiles
.OfType<FileArgumentInfo>()
.Where(q => q.ArgumentTypes == ArgumentTypes.StagedFile)
.Except(partialStagedFiles)
.Select(q => q.RelativePath)
.Select(q => !RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? $"\"{q.RelativePath}\"" : $"\"{q.RelativePath.Replace("/", @"\")}\"")
.ToList();

if (stagedFiles.Any())
{
"Re-staging staged files...".LogVerbose();
Expand Down

0 comments on commit 3fe3449

Please sign in to comment.