autoenv icon indicating copy to clipboard operation
autoenv copied to clipboard

Duplicate error about non-existent directory

Open wbyoung opened this issue 3 months ago • 2 comments

Platform

  • Operating system and version? Fedora 42
  • Shell and version? zsh 5.9 (x86_64-redhat-linux-gnu)
  • autoenv installation method: git & sourced
  • autoenv version: b030c19

Description

When changing to a non-existent directory via cd, I get duplicate error messages:

% source ~/.dotfiles/repos/autoenv/activate.sh 

% cd no_dir_here
autoenv_cd:chdir:2: no such file or directory: no_dir_here
autoenv_cd:cd:2: no such file or directory: no_dir_here

% cd ~/.dotfiles/repos/autoenv 
% git rev-parse --short HEAD
b030c19

Expected behavior

I would expect the error to be more like what appears without the tool, i.e.:

% cd no_dir_here
cd: no such file or directory: no_dir_here

Additional context

I started my zsh session via zsh -f to ensure I wasn't getting conflicts from other tools.

wbyoung avatar Sep 29 '25 00:09 wbyoung

Thanks for the report!

This was fixed in #247, but I had to revert those changes from an issue report in #254. I haven't been able to revisit that issue yet

hyperupcall avatar Sep 29 '25 07:09 hyperupcall

I left some comments over on #247: https://github.com/hyperupcall/autoenv/pull/247#pullrequestreview-3281195904.

Maybe this could help?

wbyoung avatar Sep 29 '25 18:09 wbyoung