-
-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Labels
Description
nvim --version:NVIM v0.9.5, Build type: RelWithDebInfo, LuaJIT 2.1.1703942320git --version:git version 2.43.0.windows.1- Operating system/version: Windows 11 Home 23H2
- Terminal name/version: PowerShell 7.4.1
Steps to reproduce
Attempt to install a package from a full URL (e.g. https://git.sr.ht/~adigitoleo/overview.nvim).
local fn = vim.fn
local function bootstrap()
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = bootstrap()
require("packer").startup(function(use)
-- use "adigitoleo/overview.nvim" -- THIS WORKS (github mirror)
use "https://git.sr.ht/~adigitoleo/overview.nvim" -- THIS DOESN'T
if packer_bootstrap then
require("packer").sync()
end
end)
Actual behaviour
Pakcer fails to create the "leading directories" under AppData\Local because it attempts to use the full URL as the directory name.
Expected behaviour
Installation succeeds.
Notes
Using the full URL works fine on Linux, so I'm guessing this is related to how the directory creation command is constructed on Windows only.