Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails when hooks dir not exists #25

Open
pando85 opened this issue Jun 8, 2020 · 0 comments · May be fixed by #27
Open

fails when hooks dir not exists #25

pando85 opened this issue Jun 8, 2020 · 0 comments · May be fixed by #27

Comments

@pando85
Copy link

pando85 commented Jun 8, 2020

If .git/hooks not exists, cargo-husky cannot create it and through and error on tests. Very annoying for new people in the community.

@DoBi DoBi linked a pull request Nov 26, 2020 that will close this issue
S0AndS0 added a commit to opentensor/subtensor that referenced this issue Mar 16, 2023
After merge those that pull or clone may need the following commands executed;

```bash
git pull

mkdir -p .git/hooks

SKIP_WASM_BUILD=1 RUST_LOG=runtime=debug cargo test
```

> Git hooks _should™_ be copied from `.cargo-husky/hooks` to `.git/hooks` directory
>
> Check [issue `25`][cargo-husky_issue-25] for why `mkdir` is necessary

Tip, check available names that Git recognizes for hook scripts via;

```bash
man githooks
```

Updating, or changing, hooks requires the following commands to be executed;

```bash
cargo clean

SKIP_WASM_BUILD=1 RUST_LOG=runtime=debug cargo test
```

If/when necessary Git hooks may be skipped for certain operations, eg

```bash
git commit --no-verify

git push --no-verify
```

[cargo-husky_issue-25]: rhysd/cargo-husky#25
oxmmty pushed a commit to oxmmty/bittensor-blockchain-layer that referenced this issue Sep 27, 2024
After merge those that pull or clone may need the following commands executed;

```bash
git pull

mkdir -p .git/hooks

SKIP_WASM_BUILD=1 RUST_LOG=runtime=debug cargo test
```

> Git hooks _should™_ be copied from `.cargo-husky/hooks` to `.git/hooks` directory
>
> Check [issue `25`][cargo-husky_issue-25] for why `mkdir` is necessary

Tip, check available names that Git recognizes for hook scripts via;

```bash
man githooks
```

Updating, or changing, hooks requires the following commands to be executed;

```bash
cargo clean

SKIP_WASM_BUILD=1 RUST_LOG=runtime=debug cargo test
```

If/when necessary Git hooks may be skipped for certain operations, eg

```bash
git commit --no-verify

git push --no-verify
```

[cargo-husky_issue-25]: rhysd/cargo-husky#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant