Skip to content

Commit

Permalink
Fix: nix-shell raised 'pop_var_context'
Browse files Browse the repository at this point in the history
Using nix-shell with the latest version of Nixpkgs raised the following
error:

```
bash: pop_var_context: head of shell_variables not a function context
```

Changing the order of the instructions fixed this.
  • Loading branch information
hoh authored and Psycojoker committed Aug 13, 2024
1 parent 328d7da commit d6079b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ pkgs.mkShell {
# Install the required Python packages
./venv/bin/pip install -e .\[testing\]
# Activate the virtual environment
source venv/bin/activate
# If config.yml does not exist, create it with the port specified in this shell.
[ -e config.yml ] || echo -e "postgres:\n port: $PG_PORT" > config.yml
Expand All @@ -78,5 +75,8 @@ pkgs.mkShell {
echo "PostgreSQL started. Data directory is $PGDATA, Socket directory is $PG_SOCKET_DIR" | sed 's/./=/g'
echo -e "\033[0m"
set +eu
# Activate the virtual environment
source venv/bin/activate
'';
}

0 comments on commit d6079b0

Please sign in to comment.