easybuild-org / easybuild-org/EasyBuild.Tools

Detect if `Husky.install` is used against a worktree inside of `act`

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
F#
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

When testing Github workflows locally using `act`, if we use worktrees then running `dotnet husky install` fails because we are not in a real Git repository.

To mitigate the issue, we should detect this scenario, emit a warning and not run `Husky.install`.

We can detect that we are inside of `act` by checking for `ACT` env variables and that we are inside of a worktree by checking that `.git` is actually a file and not a folder.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.