Packer.nvim: Plugins with an `as` key cause PackerClean to throw an error

Created on 15 Nov 2020  路  1Comment  路  Source: wbthomason/packer.nvim

Minimal plugins.lua:

local packer = require('packer')

packer.startup(function(use)
    use { 'dracula/vim', as = 'dracula'}
end)

Using the PackerClean (or PackerSync) command results in this error:

[packer] Error in coroutine: ...im/site/pack/packer/opt/packer.nvim/lua/packer/clean.lua:13: attempt to index local 'plugin' (a nil value)

I think this is a regression introduced by https://github.com/wbthomason/packer.nvim/commit/5df62b0b9aa7d66013c267536d06cdd388396e69 , older versions of packer don't seem to have this bug.

bug regression

Most helpful comment

Thanks for the report! Indeed, it was a regression - I accidentally dropped a nil check.

>All comments

Thanks for the report! Indeed, it was a regression - I accidentally dropped a nil check.

Was this page helpful?
0 / 5 - 0 ratings