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

codeium attempts to make the codeium folder in the root directory #319

Open
beastr45 opened this issue Feb 20, 2024 · 2 comments
Open

codeium attempts to make the codeium folder in the root directory #319

beastr45 opened this issue Feb 20, 2024 · 2 comments

Comments

@beastr45
Copy link

I would review your code for setup as codium displays an error message indicating it is attempting to write the codeium folder into the root directory even though my XDG home is set.

I havent looked at the codebase myself but the error is in this function:

Error detected while processing function codeium#server#Start[51]..39_ActuallyStart:
line 3:
E739: Cannot create directory /codeium: permission denied

@drjmcauliffe
Copy link

drjmcauliffe commented Mar 14, 2024

I had something similar on Windows 10 with Neovim in Windows Terminal:

Error detected while processing function codeium#server#Start:
line   28:
E739: Cannot create directory Z:\/.codeium: no such file or directory
Press ENTER or type command to continue

I have no Z: drive on my machine... my investigation led me to codeium.vim/autoload/codeium/command.vim:

function! codeium#command#HomeDir() abort
  let data_dir = $XDG_DATA_HOME
  if empty(data_dir)
    let data_dir = $HOME . '/.codeium'
  else
    let data_dir = data_dir . '/.codeium'
  endif
  return data_dir
endfunction

I eventually got this to work by creating an XDG_DATA_HOME environment variable that pointed to
%USERPROFILE%\AppData\Local.

However, I then get 2 .codeium folders, one in the user folder:

image

and one in the AppData\Local folder:

image

as opposed to 1 on linux:

image

... and on Windows ever time I start Neovim, codeium updates:

image

In any case, it works now... but took a bit of time to get there.

@pqn
Copy link
Contributor

pqn commented Mar 14, 2024

@nicholasmoy we could make the database respect $XDG_DATA_HOME as well

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