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

Fish complains about history and settings saving on read-only file system #6630

Closed
crabvk opened this issue Feb 20, 2020 · 6 comments
Closed

Comments

@crabvk
Copy link

crabvk commented Feb 20, 2020

My root's HOME (which is /) is on read-only file system.
When I run fish, got errors

error: Your history will not be saved.
error: Unable to locate data directory derived from $HOME: '//.local/share/fish'.
error: The error was 'Read-only file system'.
error: Please set $HOME to a directory where you have write access.

error: Your personal settings will not be saved.
error: Unable to locate config directory derived from $HOME: '//.config/fish'.
error: The error was 'Read-only file system'.
error: Please set $HOME to a directory where you have write access.

fish --version: fish, version 3.1.0
OS: Android (LineageOS 16)
echo $TERM: xterm-256color
uname -a: Linux localhost 4.9.188-perf+ #1 SMP PREEMPT Mon Feb 17 23:58:32 UTC 2020 aarch64
su -c 'env HOME=$(mktemp -d) fish': good, no errors

How to reproduce the problem:

  1. Open Termux
  2. Run su -c fish
@zanchey
Copy link
Member

zanchey commented Feb 20, 2020

This seems to be working as designed. What would you expect to happen?

@crabvk
Copy link
Author

crabvk commented Feb 20, 2020

I expected no errors. And it goes like this

error: Your history will not be saved.

Yeah, I know, I'm on read-only file system.

error: Your personal settings will not be saved.

This is fine, I have not settings, also I'm on read-only file system as I said.

@zanchey
Copy link
Member

zanchey commented Feb 20, 2020

The most common causes of this message are misconfiguration and filesystem problems, so I don't think we're going to remove the warning, though I'm happy to hear other perspectives. You could ignore it with fish --debug=-error if you want.

@zanchey zanchey added the RFC label Feb 20, 2020
@faho
Copy link
Member

faho commented Feb 20, 2020

Pretty much agreed with @zanchey. These errors are usually triggered by user issues, so having a warning is useful. You are running at reduced functionality, and we should tell you.

However, it should be possible to turn it off without turning off all errors, so let's migrate this to its own category, and make it a subcategory of warning, not error.

So how about allowing you to turn it off by disabling the "warning-path" log category? fish --debug=-warning-path

(also this should probably have a variable you can set)

@crabvk
Copy link
Author

crabvk commented Feb 20, 2020

fish --debug=-warning-path would be great!

faho pushed a commit to faho/fish-shell that referenced this issue Feb 20, 2020
The `function --on-job-exit caller` feature allows a command substitution
to observe when the parent job exits. This has never worked very well - in
particular it is based on job IDs, so a function that observes this will
run multiple times. Implement it properly.

Do this by having a not-recycled "internal job id".

This is only used by psub, but ensure it works properly none-the-less.

faho:
Backport of 6bf9ae9

Fixes fish-shell#6630
@faho faho closed this as completed in ee943a0 Feb 20, 2020
@faho
Copy link
Member

faho commented Feb 20, 2020

Okay, done.

@faho faho added this to the fish 3.2.0 milestone Feb 20, 2020
@faho faho added enhancement and removed RFC labels Feb 20, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants