Ensure working directory in scripts
So that they can be run standalone and not just through Mise
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
ensure_working_directory!() {
|
||||
root_dir="$(git rev-parse --show-toplevel)"
|
||||
|
||||
if [[ "$PWD" != "$root_dir" ]]; then
|
||||
echo "Please run the script from the root of the repo: $root_dir"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user