Skip to content

Commit bea3c67

Browse files
committed
chore: wip
1 parent 92ba206 commit bea3c67

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
dependencies:
2-
bun.sh: 1.2.20
2+
bun.sh: 1.2.19

packages/launchpad/src/dev/dump.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,8 @@ function outputShellCode(dir: string, envBinPath: string, envSbinPath: string, p
19241924
process.stdout.write(` ;;\n`)
19251925
process.stdout.write(` esac\n`)
19261926
process.stdout.write(`}\n`)
1927-
// Refresh the command hash so version switches take effect immediately (async)
1928-
process.stdout.write(`{ hash -r 2>/dev/null || true; } &\n`)
1927+
// Refresh the command hash so version switches take effect immediately (async, detached)
1928+
process.stdout.write(`(hash -r 2>/dev/null || true) >/dev/null 2>&1 & disown 2>/dev/null || true\n`)
19291929
}
19301930

19311931
/**

packages/launchpad/src/dev/shellcode.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -864,12 +864,13 @@ __launchpad_chpwd() {
864864
__launchpad_ensure_system_path
865865
__launchpad_ensure_env_path_priority
866866
867-
# Mark as ready for future use and do maintenance in background
868-
{
867+
# Mark as ready for future use and do maintenance in background (completely detached)
868+
(
869869
touch "$env_dir/.launchpad_ready" 2>/dev/null || true
870870
mkdir -p "$(dirname "$cache_file")" 2>/dev/null || true
871871
touch "$cache_file" 2>/dev/null || true
872-
} >/dev/null 2>&1 &
872+
) >/dev/null 2>&1 &
873+
disown 2>/dev/null || true
873874
874875
if [[ "\${LAUNCHPAD_SHOW_ENV_MESSAGES:-${showMessages}}" != "false" ]]; then
875876
printf "${activationMessage}\n" >&2
@@ -931,7 +932,7 @@ __launchpad_chpwd() {
931932
__launchpad_ensure_env_path_priority
932933
933934
# All file operations in background
934-
{
935+
(
935936
mkdir -p "$(dirname "$cache_file")" 2>/dev/null || true
936937
touch "$cache_file" 2>/dev/null || true
937938
if [[ -z "$dep_file" ]]; then
@@ -945,7 +946,8 @@ __launchpad_chpwd() {
945946
if [[ -n "$fp_current" ]]; then
946947
echo "$fp_current" > "$env_dir/.deps_fingerprint" 2>/dev/null || true
947948
fi
948-
} &
949+
) >/dev/null 2>&1 &
950+
disown 2>/dev/null || true
949951
950952
# Verbose diagnostics for fast path activation
951953
if [[ "$LAUNCHPAD_VERBOSE" == "true" ]]; then
@@ -1062,7 +1064,8 @@ export LAUNCHPAD_PROJECT_DIR=\"$project_dir\"
10621064
fi
10631065
10641066
# Defer post-setup quietly without background job output; precmd hook will refresh (async)
1065-
{ touch "$HOME/.cache/launchpad/shell_cache/global_refresh_needed" 2>/dev/null || true; } &
1067+
(touch "$HOME/.cache/launchpad/shell_cache/global_refresh_needed" 2>/dev/null || true) >/dev/null 2>&1 &
1068+
disown 2>/dev/null || true
10661069
10671070
# Ensure global dependencies are still in PATH after project setup
10681071
__launchpad_ensure_global_path
@@ -1071,12 +1074,13 @@ export LAUNCHPAD_PROJECT_DIR=\"$project_dir\"
10711074
__launchpad_ensure_env_path_priority
10721075
10731076
# Mark environment ready for instant future activation (both cache and marker) - async
1074-
{
1077+
(
10751078
mkdir -p "$env_dir" 2>/dev/null || true
10761079
touch "$env_dir/.launchpad_ready" 2>/dev/null || true
10771080
mkdir -p "$(dirname "$cache_file")" 2>/dev/null || true
10781081
touch "$cache_file" 2>/dev/null || true
1079-
} &
1082+
) >/dev/null 2>&1 &
1083+
disown 2>/dev/null || true
10801084
10811085
# Show clean activation message
10821086
if [[ "\${LAUNCHPAD_SHOW_ENV_MESSAGES:-${showMessages}}" != "false" ]]; then
@@ -1111,10 +1115,12 @@ export LAUNCHPAD_PROJECT_DIR=\"$project_dir\"
11111115
export PATH="$LAUNCHPAD_ORIGINAL_PATH"
11121116
11131117
# Re-add global dependencies to PATH even when deactivating (async)
1114-
{ __launchpad_ensure_global_path; } >/dev/null 2>&1 &
1118+
(__launchpad_ensure_global_path) >/dev/null 2>&1 &
1119+
disown 2>/dev/null || true
11151120
11161121
# Clear command hash table after PATH restoration (async)
1117-
{ hash -r 2>/dev/null || true; } &
1122+
(hash -r 2>/dev/null || true) >/dev/null 2>&1 &
1123+
disown 2>/dev/null || true
11181124
fi
11191125
11201126
# Restore original library paths

0 commit comments

Comments
 (0)