laravel-credentials icon indicating copy to clipboard operation
laravel-credentials copied to clipboard

Laravel 7 Nano Editor is not being used

Open evanlalo opened this issue 5 years ago • 2 comments

Problem

I've followed the steps to use the nano editor instead of vim as described in the readme. After entering the command php artisan credential:edit, the vim editor still appears. I have run php artisan config:clear and composer dumpautoload and the issue still exists.

I've even tried hardcoding "editor" => "nano" into config/credentials.php but that still does not work.

evanlalo avatar Oct 21 '20 14:10 evanlalo

It is a mistake in EditCredentialsCommand,

There is missing "s" in credentials

$editor = config('credential.editor', 'vi');

tbanov avatar Nov 30 '20 13:11 tbanov

So as @tbanov noted, in /vendor/beyondcode/laravel-credentials/src/EditCredentialsCommand.php there is line below which is accessing wrong config file: $editor = config('credential.editor', 'vi'); The correct line should be like : $editor = config('credentials.editor', 'vi'); And for now as a temporary fix you can create a second config file named credential.php and paste code below inside it: 'editor' => env('EDITOR', 'vi') This code will read the EDITOR from .env and open your editor of choice.

MostafaAryan avatar Jan 17 '21 19:01 MostafaAryan