Fix VS Code commits failing on bublic? (#1680)

This PR should fix commits failing with the VS Code / Github Desktop ui
~~and help steve to stop using "ok" as a commit message~~

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- [internal] fixed commits failing from bublic when using UI
This commit is contained in:
Lu Wilson 2023-06-30 13:25:16 +01:00 committed by GitHub
parent 91dfdecc93
commit 0e7af29085
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,13 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# if the folder we're in is called bublic, it means we're a submodule in the brivate repo.
# We need to grab .envrc to set up yarn correctly.
current_file="$(readlink -f "$0")"
if [[ $current_file == */bublic/.husky/pre-commit ]]; then
source "$(dirname -- "$0")/../../.envrc"
fi
npx lazy run build-api
git add packages/*/api-report.md
npx lint-staged