awslabs / awslabs/git-secrets

template install fails on Windows

Open
#123 1 comment 0 reactions 0 assignees View on GitHub
aged
Dominant language
Shell
Stars
13.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

trying to install template "~" directory, instead of being installed in %USERPROFILE%

git-secrets release: 1.3.0

```

PS D:\gittest\.git\hooks> $PSVersionTable.PSVersion

Major Minor Build Revision
----- ----- ----- --------
5 1 17763 316

PS D:\gittest\.git\hooks> cd
PS D:\gittest\.git\hooks> cd\
PS D:\> dir -Force

Directory: D:\

Mode LastWriteTime Length Name
---- ------------- ------ ----
d--hs- 3/6/2019 1:40 PM $RECYCLE.BIN
d----- 5/14/2019 3:42 PM badreports
d----- 4/16/2019 1:42 PM bin
d----- 5/1/2019 10:25 AM github
d----- 5/16/2019 12:18 PM gittest
d----- 5/16/2019 2:16 PM gittest2
d----- 3/8/2019 5:37 PM Logs
d--h-- 4/30/2019 10:55 AM OneDriveTemp
d----- 3/18/2019 2:38 PM PSTools
d--hs- 3/6/2019 1:24 PM System Volume Information
d----- 3/6/2019 1:24 PM Users
-a---- 3/18/2019 2:43 PM 626 admin.ps1
-a---- 5/14/2019 3:43 PM 4290 rds_sg_info_dbrsdpp.txt
-a---- 5/14/2019 3:44 PM 6014 rds_sg_info_dbrspoc.txt
-a---- 5/14/2019 3:44 PM 4151 rds_sg_info_dbrsprod.txt
-a---- 5/14/2019 3:42 PM 2116 test.sh

PS D:\> git secrets --install ~/.git-templates/git-secrets
✓ Installed commit-msg hook to ~/.git-templates/git-secrets/hooks/commit-msg
✓ Installed pre-commit hook to ~/.git-templates/git-secrets/hooks/pre-commit
✓ Installed prepare-commit-msg hook to ~/.git-templates/git-secrets/hooks/prepare-commit-msg
PS D:\> dir -Force

Directory: D:\

Mode LastWriteTime Length Name
---- ------------- ------ ----
d--hs- 3/6/2019 1:40 PM $RECYCLE.BIN
d----- 5/14/2019 3:42 PM badreports
d----- 4/16/2019 1:42 PM bin
d----- 5/1/2019 10:25 AM github
d----- 5/16/2019 12:18 PM gittest
d----- 5/16/2019 2:16 PM gittest2
d----- 3/8/2019 5:37 PM Logs
d--h-- 4/30/2019 10:55 AM OneDriveTemp
d----- 3/18/2019 2:38 PM PSTools
d--hs- 3/6/2019 1:24 PM System Volume Information
d----- 3/6/2019 1:24 PM Users
d----- 5/16/2019 2:22 PM ~
-a---- 3/18/2019 2:43 PM 626 admin.ps1
-a---- 5/14/2019 3:43 PM 4290 rds_sg_info_dbrsdpp.txt
-a---- 5/14/2019 3:44 PM 6014 rds_sg_info_dbrspoc.txt
-a---- 5/14/2019 3:44 PM 4151 rds_sg_info_dbrsprod.txt
-a---- 5/14/2019 3:42 PM 2116 test.sh

PS D:\>
```

Contributor guide

Open the contributing guide

Research direction

Reproduce `git secrets --install ~/.git-templates/git-secrets` in PowerShell on Windows and inspect how the command handles the `~` template path. Done means the template is installed under `%USERPROFILE%` rather than creating a literal `~` directory, with the reported hook installation behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, shell
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.