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

Errors on empty home #142

Open
Leseratte10 opened this issue May 23, 2020 · 2 comments
Open

Errors on empty home #142

Leseratte10 opened this issue May 23, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Leseratte10
Copy link

I was trying to start a bash shell using an empty HOME folder (for tests unrelated to resh), and that results in a bunch of resh errors.

When I run export HOME=$(mktemp -d), that results in

bash: /tmp/tmp.QyTXwj6Qdu/.resh/postcollect_last_run_out.txt: File or directory not found.
head: '/tmp/tmp.QyTXwj6Qdu/.resh/postcollect_last_run_out.txt' can't be opened for reading: File or directory not found.
resh-postcollect ERROR: 

then when I start a new bash with this manipulated HOME, I get these errors for each command:

__bp_precmd_invoke_cmd: Command not found. 
__bp_interactive_mode: Command not found. 

Is it possible to get rid of these errors when HOME is empty?

@curusarn curusarn added the bug Something isn't working label Jun 3, 2020
@curusarn
Copy link
Owner

curusarn commented Jun 19, 2020

@Leseratte10:
This (5b07e5c) should fix the first part of the problem. Can you update (reshctl update) and try if you still see the issue?

The second part is that resh depends on bash-preexec - ~/.bash-preexec.sh file is copied into your home during installation. When you copy the .resh directory into the new home you should copy the ~/.bash-preexec.sh file as well. I know that this is not ideal. To be honest I didn't really anticipate people changing their home. I will think about how I can make the whole installation more contained so that this can't happen in the future.

@Leseratte10
Copy link
Author

Can confirm that the first issue is fixed and the second issue is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants