status-react/scripts/check-nix-shell.sh
Siddarth Kumar 6924d9978d
prevent changing deps outside of nix shell (#17662)
We've often seen cases of devs attempting to change  dependencies outside a nix-shell and run into weird side effects

This commit stops them from :

- updating pods outside a nix shell
- updating node deps outside a nix shell

This commit also cleanup unused scripts in package.json and adds a fake comment script.
2023-10-17 23:35:58 +05:30

8 lines
209 B
Bash
Executable File

#!/bin/bash
# Check if inside Nix shell
if [[ -z "${IN_NIX_SHELL}" ]]; then
echo "ERROR: This command must be run inside a Nix shell. Please ensure you're inside a nix shell and try again."
exit 1
fi