Open zeorin opened 3 weeks ago
Could be related to https://github.com/cachix/devenv/issues/1107
It still works fine with spaces for me.
The error you're seeing is coming from the bash rc script that's created by Nix. If you look through .direnv/flake-profile-<hash>.rc
, you'll notice that the shell variables are wrapped in single quotes. The script will break in places where your project's directory shows up in those variables.
I would suggest opening an issue with either https://github.com/NixOS/nix or https://github.com/NixOS/nixpkgs. I can't quite tell whose responsibility it is to sanitise the paths.
A simple repo flake.nix
that doesn't use direnv
or devenv
:
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
lib = nixpkgs.lib;
forAllSystems = lib.genAttrs ["x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux"];
in
{
devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {};
}
);
};
}
Describe the bug An apostrophe in the project's path causes failure when using direnv activation.
To reproduce With
direnv
installed:Version