Skip to content

Commit

Permalink
fix: chmod ug+x .husky/pre-commit after writing structure (#719)
Browse files Browse the repository at this point in the history
## 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`.
  • Loading branch information
JoshuaKGoldberg committed Aug 29, 2023
1 parent 5538725 commit 9a8b98b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"src/migrate/index.ts",
"script/*e2e.js"
],
"ignoreBinaries": ["gh"],
"ignoreBinaries": ["chmod", "gh"],
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
Expand Down
5 changes: 5 additions & 0 deletions src/steps/writing/writeStructure.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { $ } from "execa";

import { Options } from "../../shared/types.js";
import { createStructure } from "./creation/index.js";
import { writeStructureWorker } from "./writeStructureWorker.js";

export async function writeStructure(options: Options) {
await writeStructureWorker(await createStructure(options), ".");

// https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/718
await $`chmod ug+x .husky/pre-commit`;
}

0 comments on commit 9a8b98b

Please sign in to comment.