Create ~/Work with ./bin in the path for contained projects (#1654)

* Create ~/Work with ./bin in the path for contained projects

* Split out the mise work setup as its own configurator

* Fixup the migration to reuse config logic

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Ryan Hughes
2025-09-14 08:32:07 -04:00
committed by GitHub
parent d96322e58a
commit 52680f4b3e
4 changed files with 20 additions and 1 deletions

View File

@@ -10,5 +10,5 @@ if [[ ! -v BASH_COMPLETION_VERSINFO && -f /usr/share/bash-completion/bash_comple
fi
# Set complete path
export PATH="./bin:$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
set +h

View File

@@ -10,6 +10,7 @@ run_logged $OMARCHY_INSTALL/config/ssh-flakiness.sh
run_logged $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
run_logged $OMARCHY_INSTALL/config/xcompose.sh
run_logged $OMARCHY_INSTALL/config/mise-ruby.sh
run_logged $OMARCHY_INSTALL/config/mise-work.sh
run_logged $OMARCHY_INSTALL/config/docker.sh
run_logged $OMARCHY_INSTALL/config/mimetypes.sh
run_logged $OMARCHY_INSTALL/config/localdb.sh

View File

@@ -0,0 +1,9 @@
# Add ./bin to path for all items in ~/Work
mkdir -p "$HOME/Work"
cat >"$HOME/Work/.mise.toml" <<'EOF'
[env]
_.path = "{{ cwd }}/bin"
EOF
mise trust ~/Work/.mise.toml

9
migrations/1757783204.sh Normal file
View File

@@ -0,0 +1,9 @@
echo "Create ~/Work with ./bin in the path for contained projects"
mise_config="$HOME/Work/.mise.toml"
if [[ -f $mise_config ]]; then
cp $mise_config "$mise_config.bak.$(date +%s)"
fi
source "$OMARCHY_PATH/install/config/mise-work.sh"