Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Failure to open editor if that is an alias #992

Open
ssbarnea opened this issue May 5, 2022 · 3 comments
Open

Failure to open editor if that is an alias #992

ssbarnea opened this issue May 5, 2022 · 3 comments
Labels
bug Something isn't working stale

Comments

@ssbarnea
Copy link

ssbarnea commented May 5, 2022

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

  1. Type this '...'
  2. View the output '....'
  3. 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
@ssbarnea ssbarnea added the bug Something isn't working label May 5, 2022
@ssbarnea
Copy link
Author

ssbarnea commented May 5, 2022

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...

@ssbarnea
Copy link
Author

ssbarnea commented May 5, 2022

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.

@clemsbot
Copy link
Collaborator

clemsbot commented Jun 5, 2022

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.

@clemsbot clemsbot added the stale label Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants