Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): put ~/.local/bin on the boot service PATH so providers resolve #5013

Closedarhxam(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/5013/headopened View on GitHub

Showing 2 changed files with 12 additions and 0 deletions.

x
0 of 2 viewed, 2 left
3 additions and 0 deletionsapps/server/src/cloud/bootService.test.tsModified
View file
@@ -108,6 +108,7 @@
"[Service]",
"Type=simple",
"WorkingDirectory=%h",
+ "Environment=PATH=%h/.local/bin:%h/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
"Environment=T3CODE_HOME=/home/theo/.t3",
"Environment=T3_BOOT_SERVICE_UNIT=t3code.service",
"ExecStart=/usr/local/bin/node /home/theo/.t3/runtime/versions/0.0.27/node_modules/t3/dist/bin.mjs serve",
@@ -137,6 +138,8 @@
});
assert.include(unit, 'ExecStart="/home/me/my tools/node" "/home/me/T3 Data/bin.mjs" serve');
assert.include(unit, 'Environment=T3CODE_HOME="/home/me/T3 Data"');
+ // ~/.local/bin is prepended so user-scoped provider CLIs resolve.
+ assert.include(unit, "Environment=PATH=%h/.local/bin:%h/bin:");
// append: paths take the rest of the line literally (spaces are fine,
// quoting is not), but % still goes through specifier expansion.
assert.include(unit, "StandardOutput=append:/home/me/100%%logs/boot.log");
9 additions and 0 deletionsapps/server/src/cloud/bootService.tsModified
View file
@@ -100,6 +100,15 @@
"[Service]",
"Type=simple",
"WorkingDirectory=%h",
+ // A systemd user unit inherits the user manager's minimal PATH, which does
+ // NOT include ~/.local/bin — the directory Ubuntu's ~/.profile prepends and
+ // where user-scoped provider CLIs (claude, codex) land on a headless
+ // install. Without this, `t3 serve` finds every provider by hand from a