mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
Add robust command availability checks to all shell scripts
- Add check for @defaultPackageName@-devenv in activateDevenv.sh - Add check for uv command in initPython.sh - Add check for git command in initProject.sh (with graceful degradation) - Add checks for wget, sed, nix in updateDeps.sh - Provide clear error messages when commands are not available - Prevent scripts from failing with cryptic errors when tools are missing Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
parent
8fc712be60
commit
0273515951
4 changed files with 56 additions and 16 deletions
|
|
@ -2,6 +2,11 @@
|
|||
set -euo pipefail
|
||||
if [[ -f "devenv.nix" ]]; then
|
||||
echo "🚀 Activating devenv environment..."
|
||||
if ! command -v @defaultPackageName@-devenv &> /dev/null; then
|
||||
echo "❌ Command '@defaultPackageName@-devenv' not found."
|
||||
echo "Ensure devenv is properly configured in your environment."
|
||||
exit 1
|
||||
fi
|
||||
exec @defaultPackageName@-devenv shell
|
||||
else
|
||||
echo "❌ No devenv.nix file found in the current directory."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue