-
Notifications
You must be signed in to change notification settings - Fork 25
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
issue: Could not find Bash on NixOS while setting persist mode #26
Comments
It seems, that you need to add another bash path to your services.go: "/run/current-system/sw/bin/bash" |
Thank you for pointing that out, @igor-frolikov. I think it has to be the full path because some of these are run before path variables are set. But that said, there is probably a better way to set it. Can you check if running |
[igor@nixos:~]$ command -v bash NixOS has different file structure. Here are almost all symlinks. The path is standard for all NixOS Linux systems. |
Here's a fix. Please let me know if it works. |
[igor@nixos:~/Downloads]$ sudo ./bat -c [igor@nixos:~/Downloads]$ sudo ./bat -t 60 [igor@nixos:~/Downloads]$ sudo ./bat -c [igor@nixos:~/Downloads]$ sudo ./bat -p Actually NixOS would never allow to write to system files. Thank you for your efforts. I wrote a simple script for cron. Works perfect even on Arch. Just on NixOS I run cron job using NixOS way. |
Change the function that queries the location of the Bash shell on the operating system to look inside of the $PATH environment variable instead of defaulting to standard locations such as /bin/ and /usr/bin/ that maybe not be true for all Unix operating systems i.e. NixOS. See #26.
Subject of the issue
[igor@nixos:~]$ sudo bat -t 80
Charging threshold set.
Use
sudo bat --persist
to persist the setting between restarts.[igor@nixos:~]$ sudo bat -p
Could not find Bash on your system.
NixOS uses Bash as default shell. Please, check your shell calls. Setting threshold works fine.
Your system
OS: NixOS 22.05 (Quokka) x86_64
Host: ASUSTeK COMPUTER INC. X513IA
Kernel: 5.15.43
Version
0.9 (Latest)
Steps to reproduce
No response
Expected behaviour
No response
Actual behaviour
No response
The text was updated successfully, but these errors were encountered: