ThePrez / ServiceCommander-IBMi

Service Commander for IBM i
Apache License 2.0
40 stars 12 forks source link

[BUG] scedit doesn't respect $EDITOR unless it is a fully qualified path #191

Closed martintosney closed 1 year ago

martintosney commented 1 year ago

Describe the bug

I'm just trying out SC for the first time - it's pretty cool!

I tried scedit and read that it should respect the EDITOR variable. I found that it would always load nano instead.

Looking at the script, I think this is because I only had EDITOR set to vim, not /QOpenSys/pkgs/bin/vim. Fully qualifying the path makes it work as expected, but I've not found this to be required for other tools I've used.

Perhaps the script could resolve $EDITOR to a full path with which, before the test to see if it is executable?

To Reproduce

Set EDITOR to vim (with vim installed on the system); run scedit for a service.

Expected behavior

Service configuration is loaded into vim, not nano.

ThePrez commented 1 year ago

Thanks for finding and reporting!