mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix: apply the review items for #691 at merge
test: pin the double-quoted PATH literal of withRemoteTmuxPath() (dash 0.5.11+, bash and busybox pass the shell cases unquoted) docs: note in architecture-invariants that a new remote pane inherits the widened PATH from the creating tmux client Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b9445de9e
commit
1444c41250
2 files changed
+11
-1
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
buildRemoteTmuxCheckCommand,
|
||||
buildRemoteSessionAliveCommand,
|
||||
buildRemoteListSessionsCommand,
|
||||
withRemoteTmuxPath,
|
||||
} from '../src/remote-hosts.js';
|
||||
import {
|
||||
buildRemoteLaunchCommand,
|
||||
@@ -106,6 +107,15 @@ esac
|
||||
});
|
||||
afterAll(() => rmSync(root, { recursive: true, force: true }));
|
||||
|
||||
// Literal pin for the quotes. dash 0.5.11+, bash and busybox do not field-split
|
||||
// `export` arguments, so the real-shell cases below also pass with an unquoted
|
||||
// PATH, and the other builder tests compute their expectation from the wrapper.
|
||||
it('double-quotes the whole exported PATH value', () => {
|
||||
expect(withRemoteTmuxPath('tmux -V')).toBe(
|
||||
'export PATH="$HOME/.opencode/bin:$HOME/.local/bin:$HOME/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"; tmux -V'
|
||||
);
|
||||
});
|
||||
|
||||
for (const shell of ['/bin/sh', ...(existsSync('/bin/dash') ? ['/bin/dash'] : [])]) {
|
||||
for (const item of cases) {
|
||||
it(`${item.name} finds the remote-user tmux with ${shell} and preserves targeting/options`, () => {
|
||||
|
||||
Reference in new issue
Block a user