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
pull/1685/head
Lu Wilson 2023-06-30 13:25:16 +01:00 zatwierdzone przez GitHub
rodzic 91dfdecc93
commit 0e7af29085
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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