You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(setup): use sudo -u unconditionally and resolve pm2 via mise exec
- asUser and the deploy-dir chown built \`\$SUDO -u ...\` which reduces
to a broken \`-u ...\` command when SSH is already root (EUID=0 sets
SUDO=""). sudo is transparent under root, so unconditional \`sudo -u\`
works for both entry paths without leaving \`-u\` naked.
- \`pm2 startup\` targeted \`~/.local/share/mise/shims/pm2\` which fails
with "not a valid shim" because mise only shims tools it manages
itself, not npm-installed globals like pm2. Resolve pm2's real path
via \`mise exec node@X -- which pm2\` under the deploy user, then
invoke that binary with an env PATH pointing at the same directory
so pm2's spawn of node resolves.
0 commit comments