Skip to content

Commit df31e9a

Browse files
committed
chore: wip
1 parent ac7fa1f commit df31e9a

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

packages/launchpad/src/dev/shellcode.ts

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,36 +168,57 @@ __launchpad_update_library_paths() {
168168
fi
169169
}
170170
171-
# Setup global dependencies (only if user has manually created them)
171+
# Setup global dependencies (from multiple possible locations)
172172
__launchpad_setup_global_deps() {
173+
# Check the standard global environment
173174
local global_env_dir="$HOME/.local/share/launchpad/global"
174-
175-
# Only activate if user has manually created a global environment
176175
if [[ -d "$global_env_dir/bin" ]]; then
177176
__launchpad_update_path "$global_env_dir/bin"
178177
fi
179178
if [[ -d "$global_env_dir/sbin" ]]; then
180179
__launchpad_update_path "$global_env_dir/sbin"
181180
fi
182-
183-
# Set up library paths for global dependencies
184181
if [[ -d "$global_env_dir" ]]; then
185182
__launchpad_update_library_paths "$global_env_dir"
186183
fi
184+
185+
# Also check for global dependencies from ~/.dotfiles
186+
local dotfiles_env_pattern="$HOME/.local/share/launchpad/.dotfiles_*"
187+
for dotfiles_env in $dotfiles_env_pattern; do
188+
if [[ -d "$dotfiles_env/bin" ]]; then
189+
__launchpad_update_path "$dotfiles_env/bin"
190+
fi
191+
if [[ -d "$dotfiles_env/sbin" ]]; then
192+
__launchpad_update_path "$dotfiles_env/sbin"
193+
fi
194+
if [[ -d "$dotfiles_env" ]]; then
195+
__launchpad_update_library_paths "$dotfiles_env"
196+
fi
197+
done
187198
}
188199
189200
# Ensure global dependencies are always in PATH
190201
__launchpad_ensure_global_path() {
202+
# Add standard global environment to PATH if it exists
191203
local global_env_dir="$HOME/.local/share/launchpad/global"
192-
193-
# Add global environment to PATH if it exists
194204
if [[ -d "$global_env_dir/bin" ]]; then
195205
__launchpad_update_path "$global_env_dir/bin"
196206
fi
197207
if [[ -d "$global_env_dir/sbin" ]]; then
198208
__launchpad_update_path "$global_env_dir/sbin"
199209
fi
200210
211+
# Also ensure global dependencies from ~/.dotfiles are in PATH
212+
local dotfiles_env_pattern="$HOME/.local/share/launchpad/.dotfiles_*"
213+
for dotfiles_env in $dotfiles_env_pattern; do
214+
if [[ -d "$dotfiles_env/bin" ]]; then
215+
__launchpad_update_path "$dotfiles_env/bin"
216+
fi
217+
if [[ -d "$dotfiles_env/sbin" ]]; then
218+
__launchpad_update_path "$dotfiles_env/sbin"
219+
fi
220+
done
221+
201222
# Always ensure critical system paths are available
202223
__launchpad_ensure_system_path
203224
}

0 commit comments

Comments
 (0)