Code Monkey home page Code Monkey logo

Comments (2)

curiousleo avatar curiousleo commented on July 30, 2024

I've tried but failed to reproduce this with Bash:

$ export PATH="/path\ with\ spaces/bla:$PATH"
$ cd lorri/
direnv: loading .envrc
direnv: export +AR +AS +BUILD_REV_COUNT +CARGO_INSTALL_ROOT +CC +CONFIG_SHELL +CXX +HISTFILE +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST +NIX_BUILD_CORES +NIX_BUILD_TOP +NIX_CC +NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_INDENT_MAKE +NIX_LDFLAGS +NIX_LOG_FD +NIX_STORE +NM +OBJCOPY +OBJDUMP +RANLIB +READELF +RUN_TIME_CLOSURE +RUST_BACKTRACE +RUST_SRC_PATH +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +allowSubstitutes +buildInputs +builder +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +extraClosure +name +nativeBuildInputs +nobuildPhase +origArgs +origBuilder +origExtraClosure +origOutputs +origPATH +origSystem +out +outputs +patches +phases +preHook +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH
$ echo $PATH | tr ':' '\n' | grep 'exist'
/path with spaces/bla

That looks fine to me. Would you be able to describe a repro case in more detail? I think it would be useful to include

  • the $PATH
  • the .envrc

from lorri.

GTRI-nathan avatar GTRI-nathan commented on July 30, 2024

I think I might be running into this inside of WSL (windows subsystem for linux), where the PATH has parentheses in it. (Things like Program Files (x86)")

$ cd test_nix_project/ direnv: loading ~/test_nix_project/.envrc ./.envrc: eval:64: syntax error near unexpected token (' ./.envrc: eval:64: PATH=/nix/store/mwfy3ihfydvrjmsimbd2kkr20n9abqsv-patchelf-0.9/bin:/nix/store/1wb31gzrjw055xl6d3igzj1gnajzlwbk-gcc-wrapper-9.2.0/bin:/nix/store/gh9a48qcwzw588vy4w72w93kad0mhhi8-gcc-9.2.0/bin:/nix/store/c2lx3lsqp0y5kwvwkqma8iihc7xjj1m8-glibc-2.30-bin/bin:/nix/store/hzvl3dvv8651iqlb5g6gq5hzjzmhjn7m-coreutils-8.31/bin:/nix/store/ahfsyzh84splz1p5ryj9j1isqgm5739b-binutils-wrapper-2.31.1/bin:/nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin:/nix/store/c2lx3lsqp0y5kwvwkqma8iihc7xjj1m8-glibc-2.30-bin/bin:/nix/store/hzvl3dvv8651iqlb5g6gq5hzjzmhjn7m-coreutils-8.31/bin:/nix/store/njlavpa90laywf22b1myif5101qhln8r-hello-2.10/bin:/nix/store/hzvl3dvv8651iqlb5g6gq5hzjzmhjn7m-coreutils-8.31/bin:/nix/store/rphcpivxfm4blw36ki262yrmqygw9pcp-findutils-4.7.0/bin:/nix/store/h3bhvh06cf03lhw3vhrlr9452d8xh0s4-diffutils-3.7/bin:/nix/store/9k90a16frvqdcxzkhxcjsi2qczv3i4x4-gnused-4.8/bin:/nix/store/pmwf1fz03c5say5fnqk4m748rjb8kdy7-gnugrep-3.4/bin:/nix/store/bs7s8z6i8dbg7n9b2a7388j1lb1ff8sf-gawk-5.0.1/bin:/nix/store/kpmfasdwafdra2vp4lvh91crkbhiwrar-gnutar-1.32/bin:/nix/store/6dii8sv225fh5xxfi1mxrx3f1fwsncjs-gzip-1.10/bin:/nix/store/xqjvicyyrhvlzdp3mxhajqnvcchrp867-bzip2-1.0.6.0.1-bin/bin:/nix/store/v892my0gwjh9f4wrq1dxvq8r0xq3cdkn-gnumake-4.2.1/bin:/nix/store/z4ajipns0l1s8b2lrgpy6nng4cys7h99-bash-4.4-p23/bin:/nix/store/l0cr1p5jwdri59lq01yrvi1ksq4vhr9c-patch-2.7.6/bin:/nix/store/kdpw564f5fkby8dm08jcxx151vpb1yxf-xz-5.2.4-bin/bin:/home/nbraswell6/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2020.5.0_x64__79rhkp1fndgsc:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/PuTTY:/mnt/c/Program Files (x86)/QuickTime/QTSystem:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Python/Python38/Scripts:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Python/Python38:/mnt/c/Users/nbraswell6/.cargo/bin:/mnt/c/Users/nbraswell6/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Git/cmd:/snap/bin' direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST +NIX_BUILD_CORES +NIX_BUILD_TOP +NIX_CC +NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_INDENT_MAKE +NIX_LDFLAGS +NIX_LOG_FD +NIX_STORE +NM +OBJCOPY +OBJDUMP +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +allowSubstitutes +buildInputs +builder +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +extraClosure +name +nativeBuildInputs +nobuildPhase +origArgs +origBuilder +origExtraClosure +origOutputs +origPATH +origSystem +out +outputs +patches +phases +preHook +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH

PATH is
/home/nbraswell6/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2020.5.0_x64__79rhkp1fndgsc:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/PuTTY:/mnt/c/Program Files (x86)/QuickTime/QTSystem:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Python/Python38/Scripts:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Python/Python38:/mnt/c/Users/nbraswell6/.cargo/bin:/mnt/c/Users/nbraswell6/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/nbraswell6/AppData/Local/Programs/Git/cmd:/snap/bin

.envrc is eval "$(lorri direnv)"

Note that the same thing happens with lorri shell, so I think it's lorri and not direnv

from lorri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.