Still investigating why..
Issue: OMARCHY_PATH and PATH for omarchy/bin missing after omarchy-update
Description:
Following an omarchy-update, the $OMARCHY_PATH environment variable appears to be missing, which causes subsequent update attempts and other omarchy commands to fail. Manually exporting OMARCHY_PATH and adding $OMARCHY_PATH/bin to the system's $PATH in ~/.bashrc resolves the issue. This suggests that the update process may be interfering with the shell environment configuration.
Steps to Reproduce:
- Run
omarchy-update on a functioning omarchy installation.
- After the update completes, open a new terminal session.
- Attempt to run
omarchy-update again.
Expected Behavior:
The omarchy-update command should execute successfully without any modifications to the user's .bashrc file. The $OMARCHY_PATH variable and the path to the omarchy binaries should be correctly set in the shell environment.
Actual Behavior:
The omarchy-update command fails with a "command not found" error for omarchy-update-git, as shown in the logs below. This is due to the $OMARCHY_PATH variable being unset.
Error Logs:
~
❯ ~/.local/share/omarchy/bin/omarchy-update
/home/shk/.local/share/omarchy/bin/omarchy-update: line 5: omarchy-update-git: command not found
~
❯ echo $PATH
./bin:/home/shk/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
~
❯ cd ~/.local/share/omarchy/bin/
omarchy/bin on master [✘]
❯ ~/.local/share/omarchy/bin/omarchy-update
/home/shk/.local/share/omarchy/bin/omarchy-update: line 5: omarchy-update-git: command not found
omarchy/bin on master [✘]
❯ cd ..
omarchy on master [✘]
❯ ~/.local/share/omarchy/bin/omarchy-update
Update Omarchy
fatal: cannot change to 'pull': No such file or directory
fatal: cannot change to 'diff': No such file or directory
fatal: cannot change to 'reset': No such file or directory
omarchy on master [✘]
❯ pwd
/home/shk/.local/share/omarchy
omarchy on master [✘]
❯ ~/.local/share/omarchy/bin/omarchy-update all
Update Omarchy
fatal: cannot change to 'pull': No such file or directory
fatal: cannot change to 'diff': No such file or directory
fatal: cannot change to 'reset': No such file or directory
omarchy on master [✘]
❯ bash -x ~/.local/share/omarchy/bin/omarchy-update all
+ set -e
+ omarchy-update-git
Update Omarchy
fatal: cannot change to 'pull': No such file or directory
fatal: cannot change to 'diff': No such file or directory
fatal: cannot change to 'reset': No such file or directory
Workaround:
The issue was resolved by adding the following lines to ~/.bashrc:
# added
export OMARCHY_PATH=~/.local/share/omarchy
export PATH=$OMARCHY_PATH/bin:$PATH
After sourcing the updated .bashrc or opening a new terminal, omarchy-update functions as expected.
Successful run after applying the workaround:
omarchy on master [✘]
❯ export OMARCHY_PATH=~/.local/share/omarchy
omarchy on master [✘]
❯ echo $OMARCHY_PATH
/home/shk/.local/share/omarchy
omarchy on master [✘]
❯ bash -x ~/.local/share/omarchy/bin/omarchy-update all
+ set -e
+ omarchy-update-git
Update Omarchy
remote: Enumerating objects: 178, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 178 (delta 65), reused 40 (delta 40), pack-reused 91 (from 3)
Receiving objects: 100% (178/178), 1.75 MiB | 5.63 MiB/s, done.
Resolving deltas: 100% (92/92), completed with 17 local objects.
From https://github.com/basecamp/omarchy
79bdb15..3d283ea master -> origin/master
79bdb15..1d483da dev -> origin/dev
Updating 79bdb15..3d283ea
Created autostash: c199206
Fast-forward
bin/omarchy-menu | 4 ++--
bin/omarchy-update-system-pkgs | 2 +-
config/hypr/bindings.conf | 4 ++++
config/hypr/hyprland.conf | 14 +++++++-------
default/hypr/bindings/utilities.conf | 2 +-
install.sh | 2 +-
install/config/login.sh | 3 ++-
7 files changed, 18 insertions(+), 13 deletions(-)
Applied autostash.
+ omarchy-migrate
+ omarchy-update-system-pkgs
Update system packages
[sudo] password for shk:
:: Synchronizing package databases...
core is up to date
extra is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
-> Flagged Out Of Date AUR Packages: wl-screenrec
there is nothing to do
+ omarchy-update-restart
System Information:
- OS: Arch Linux (as implied by the
omarchy context).
- Shell: bash
Additional Context:
The user reported that other users have experienced the same issue. This indicates it's likely a recurring problem and not an isolated incident. The issue seems to stem from how the omarchy-update script handles shell environment variables, potentially overwriting or failing to preserve them across its execution.
Still investigating why..
Issue:
OMARCHY_PATHandPATHfor omarchy/bin missing after omarchy-updateDescription:
Following an
omarchy-update, the$OMARCHY_PATHenvironment variable appears to be missing, which causes subsequent update attempts and otheromarchycommands to fail. Manually exportingOMARCHY_PATHand adding$OMARCHY_PATH/binto the system's$PATHin~/.bashrcresolves the issue. This suggests that the update process may be interfering with the shell environment configuration.Steps to Reproduce:
omarchy-updateon a functioningomarchyinstallation.omarchy-updateagain.Expected Behavior:
The
omarchy-updatecommand should execute successfully without any modifications to the user's.bashrcfile. The$OMARCHY_PATHvariable and the path to theomarchybinaries should be correctly set in the shell environment.Actual Behavior:
The
omarchy-updatecommand fails with a "command not found" error foromarchy-update-git, as shown in the logs below. This is due to the$OMARCHY_PATHvariable being unset.Error Logs:
Workaround:
The issue was resolved by adding the following lines to
~/.bashrc:After sourcing the updated
.bashrcor opening a new terminal,omarchy-updatefunctions as expected.Successful run after applying the workaround:
System Information:
omarchycontext).Additional Context:
The user reported that other users have experienced the same issue. This indicates it's likely a recurring problem and not an isolated incident. The issue seems to stem from how the
omarchy-updatescript handles shell environment variables, potentially overwriting or failing to preserve them across its execution.