dotnet add package ShAssocCheck --version 0.3.0
NuGet\Install-Package ShAssocCheck -Version 0.3.0
<PackageReference Include="ShAssocCheck" Version="0.3.0" />
paket add ShAssocCheck --version 0.3.0
#r "nuget: ShAssocCheck, 0.3.0"
// Install ShAssocCheck as a Cake Addin
// Install ShAssocCheck as a Cake Tool
Git for Windows and MSYS2 are capable of providing nearly seamless
Bash/CoreUtils integration on Windows. This package verifies that integration is present, and reports developer-friendly diagnostic messages in cases where integration is missing or not behaving as-expected. It will also detect and automatically repair a known issue in Git for Windows integration. If you would like your Visual Studio projects to be robust against developers encountering mysterious build failures due to pipe redirection failures or missing
.sh file associations, then add this NuGet dependency.
Keep in mind that this NuGet package normally doesn't do anything, except verify that
.sh scripts are in fact working. If you have a controlled development environment where you can ensure everyone has Bash/CoreUtils properly installed, then there's really no need to use the
ShAssocCheck NuGet Package.
Changes since 0.2.0
- Fixed a packaging error that caused file to report as missing even when it wasn't
If you have a solution with many projects then it is a good idea to attach
ShAssocCheck NuGet package to a special startup project in your solution that runs before anything else. Often times solutions will have such a project for the purpose of collecting git repository version information and this NuGet package is best added as a dependency there. If the solution doesn't have such a project, then probably it probably should have one.
Why use Bash / CoreUtils ?
In simple terms, CoreUtils and Bash provide a robust CLI toolset that accelerate software development.
- well-documented POSIX-compliant system
- compatible with Linux and Mac
- eliminates need to have
.shfor one platform and
- Consistent newline behavior
- eliminates need to have
- robust long path name support
- Path names up to 32,700 characters always work as expected
cmdand PowerShell are still limited to 260 chars)
How it Works
The script tests for operational
.sh file associations by running a short
.sh script and getting the result via pipe redirection. If it works, then the script does nothing else. If that check fails, the script proceeds to check
sh_auto_file and see if it matches git-bash.exe. If so, it applies the Git for Windows association patch fix via a NSIS installer. The installer is used because it provides the Admin Elevated Rights profile required to modify file types and associations, and will be invoked only once after any Git for Windows install/update (due to GitWin overwritting our association with it's broken one).
Support for stand-alone MSYS2 is currently less than ideal. It's strongly recommended to use Git for Windows as it integrates far better with Windows shell and Explorer out-of-the-box.
This package has no dependencies.
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Initial package release.