Skip to content

Commit

Permalink
[utils] use nix develop in utils/shell.sh if available
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Feb 5, 2023
1 parent 995efc8 commit 042f0ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ set -eu
cd $(dirname $0)
cd ..

if command -v nix-shell; then
if nix develop --help 2>/dev/null 1>/dev/null; then
if [ -n "$*" ]; then
nix develop . --command bash -c "$*"
else
nix develop .
fi
elif command -v nix-shell; then
if [ -n "$*" ]; then
nix-shell --run "$*"
else
Expand Down

0 comments on commit 042f0ae

Please sign in to comment.