Giter VIP home page Giter VIP logo

Comments (13)

mennthor avatar mennthor commented on July 20, 2024 1

Is config_dir settable via ENVVAR? Then I could choose a suitable path myself.
And yes, all of ~ is read-only atm (I had to reroute basically all settings, vim, pip, jupyter, etc.).

from helix.

archseer avatar archseer commented on July 20, 2024 1

This is on the latest release (0.0.10), and the error is still "Read-only file system"? It's supposed to log to XDG_CACHE_HOME/helix/helix.log now.

from helix.

Siilwyn avatar Siilwyn commented on July 20, 2024 1

Maybe it would be nice to use the new XDG_STATE_HOME for this.

from helix.

archseer avatar archseer commented on July 20, 2024

Good point, we should probably log into config_dir() (usually ~/.config/helix)

pub fn config_dir() -> std::path::PathBuf {
// TODO: allow env var override
use etcetera::base_strategy::{choose_base_strategy, BaseStrategy};
let strategy = choose_base_strategy().expect("Unable to find the config directory!");
let mut path = strategy.config_dir();
path.push("helix");
path
}

Right now it just always uses home:

.chain(fern::log_file(home.join("helix.log"))?);

from helix.

vv9k avatar vv9k commented on July 20, 2024

Changing the path to config_dir still doesn't resolve the issue of $HOME being read-only. I'm wondering if perhaps the result of setup_logging should be ignored so users can still operate without the logging mechanism?

from helix.

archseer avatar archseer commented on July 20, 2024

I reopened this since it doesn't fully resolve your issue; is ~/.config/``~/.local/ etc. completely unwritable? I find that a bit surprising.

from helix.

pickfire avatar pickfire commented on July 20, 2024

The weirdest thing I find is it logs (at first to home, then to ~/.config which it shouldn't) by default, I thought log should be opt-in? If not we can just log to /tmp right? See #64

from helix.

pickfire avatar pickfire commented on July 20, 2024

What if we do like -u <config> or -u none? none to disable config.

from helix.

coldpure9ev avatar coldpure9ev commented on July 20, 2024

it's just the log function, we shouldn't just disable the config. Maybe we can make it /tmp by default or spare, and when the log file unwriteable , the editor should be useable, and don't forget the warning info

from helix.

archseer avatar archseer commented on July 20, 2024

We follow the XDG specification on Linux/macOS, so if you set XDG_CACHE_HOME it'll look for a helix folder there. I think that should be the preferred solution, since that way you're able to fix all applications that rely on XDG.

I think we don't need a separate flag to disable this because we'll be leveraging the cache even more in the future (to store :command history, /search history, persist undo states & document positions across restarts etc)

from helix.

mennthor avatar mennthor commented on July 20, 2024

We follow the XDG specification on Linux/macOS, so if you set XDG_CACHE_HOME it'll look for a helix folder there.

Not sure I get that correctly. I already have XDG_CACHE_HOME, XDG_STATE_HOME and XDG_CACHE_HOME set to writable and existing directories (and also added a helix folder in each, just to be sure), but the logging error is still there.
Am I overlooking a setting / flag I need to give at startup?

from helix.

mennthor avatar mennthor commented on July 20, 2024

Sorry, that was my fault. It does indeed log to XDG_CACHE_HOME/helix/helix.log now.
Thanks :)

from helix.

pickfire avatar pickfire commented on July 20, 2024

@mennthor Ah, no. Thanks for sending in the issue request. It was only since 0.0.10 doing that but 0.0.9 doesn't have this. Closing this as it isn't an issue, it was also shown in -h.

from helix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.