glab
glab copied to clipboard
Failure to open editor if that is an alias
Description
glab fails to open user EDITOR=foo
if foo
is defined as an alias. That is because it wrongly assumes that this must be an executable.
Expected Behavior vs Actual Behavior
Use shell to run editor instead of trying to execute it as a command.
Current behavior break for at least two use cases: aliases and shell functions. On both, it will fail to start the tesit.
Possible Fix
Steps to Reproduce
- Type this '...'
- View the output '....'
- See error
Logs
? Description [(e) or Enter to launch edit, (s) or Esc to skip] exec: "edit": executable file not found in $PATH
Your Environment
- Version used (Run
glab --version
): glab version 1.22.0 (2022-01-10) - Operating System and version: MacOS 12.3.1
To make situation even worse it seems that the options to reconfigure it do not work, mainly commands report success but editor is not changed:
ssbarnea@m1: ~/c/a/cci-config fix/ansible
$ glab config set -g editor 'code -r -a'
ssbarnea@m1: ~/c/a/cci-config fix/ansible
$ glab config get editor
edit
cat ~/.config/glab-cli/config.yml | grep editor
editor: !!null code -r -a
Now we know why...
I only gets better... I manually updated the config to change the editor and it still reports edit
. I am clueless regarding where this value is coming from. I guess that my only chance is to create wrapper edit
script and put it in path.
This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.