Commit fca8e9e
committed
fix(agent): match os.ErrNotExist when probing nsenter binary
probeTimeNSJoinable invokes nsenter via the absolute path
/usr/bin/nsenter, so exec.Command skips LookPath and can never
return exec.ErrNotFound. A missing binary surfaces as *fs.PathError
wrapping ENOENT, leaving the "nsenter not found" branch dead. Match
os.ErrNotExist instead so the warning actually fires.
Also assert session.Exit(1) is called in TestShell_StartPtyError, the
behaviour the test documents but did not verify.1 parent af3cac9 commit fca8e9e
2 files changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| |||
0 commit comments