Skip to content

Commit 9a8b98b

Browse files
fix: chmod ug+x .husky/pre-commit after writing structure (#719)
## PR Checklist - [x] Addresses an existing open issue: fixes #718 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Applies the suggested fix from typicode/husky#1177 of manually changing the file's mode with `chmod`.
1 parent 5538725 commit 9a8b98b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

knip.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"src/migrate/index.ts",
88
"script/*e2e.js"
99
],
10-
"ignoreBinaries": ["gh"],
10+
"ignoreBinaries": ["chmod", "gh"],
1111
"ignoreExportsUsedInFile": {
1212
"interface": true,
1313
"type": true

src/steps/writing/writeStructure.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import { $ } from "execa";
2+
13
import { Options } from "../../shared/types.js";
24
import { createStructure } from "./creation/index.js";
35
import { writeStructureWorker } from "./writeStructureWorker.js";
46

57
export async function writeStructure(options: Options) {
68
await writeStructureWorker(await createStructure(options), ".");
9+
10+
// https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/718
11+
await $`chmod ug+x .husky/pre-commit`;
712
}

0 commit comments

Comments
 (0)