Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistantInstall failed - attempt to compare string with nil #113

Open
RyanHJohnston opened this issue Jul 19, 2023 · 3 comments
Open

DistantInstall failed - attempt to compare string with nil #113

RyanHJohnston opened this issue Jul 19, 2023 · 3 comments

Comments

@RyanHJohnston
Copy link

I encounter this error whenever the DistantInstall command is executed (or any distant command):

E5108: Error executing lua ...ite/pack/packer/start/distant.nvim/lua/distant/utils.lua:475: attempt to compare string with nil                                                                                                                                                    
stack traceback:                                                                                                                                                                                                                                                                  
        ...ite/pack/packer/start/distant.nvim/lua/distant/utils.lua:475: in function 'can_upgrade_version'                                                                                                                                                                        
        .../pack/packer/start/distant.nvim/lua/distant/cli/init.lua:114: in function 'validate_cli'                                                                                                                                                                               
        .../pack/packer/start/distant.nvim/lua/distant/cli/init.lua:129: in function 'install'                                                                                                                                                                                    
        ...e/pack/packer/start/distant.nvim/lua/distant/command.lua:243: in function 'install'                                                                                                                                                                                    
        [string ":lua"]:1: in main chunk       

To recreate the issue, all you have to do is add the distant.nvim package using Packer, install with :PackerInstall, execute :so, then run the :DistantInstall command. I originally compiled from source and it worked all the way up to the last step of the compilation (i.e. 404/405). This error occurs even when reinstalling it.

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Jul 20, 2023

@RyanHJohnston version 0.3 is about to be released as the recommended branch. Can you give it a try instead? Documentation is still being written, but check out the installation section: https://distant.dev/editors/neovim/

The reason is that v0.2 of the plugin used an older version of the distant CLI, so my guess is that the version that is supposed to be used is different, but the v0.2 branch of the plugin also has a bug with checking CLI versions. Curious if v0.3 solves that issue.

With packer, you should be able to set it up like this:

use {
    'chipsenkbeil/distant.nvim',
    branch = 'v0.3',
    config = function()
        require('distant'):setup()
    end
}

@gegnew
Copy link

gegnew commented Aug 3, 2023

Also having this issue; above set up does not work. On M1 mac

Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 arm64

@chipsenkbeil
Copy link
Owner

Also having this issue; above set up does not work. On M1 mac

Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 arm64

What error are you seeing when using v0.3? The stack trace shown in the picture is for v0.2 as the can_upgrade_version is only a function in v0.2.

Can you print out the version of the distant cli that was downloaded (should be 0.20.0 with no alpha) and the branch you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants