Originally created by: kumaakh
The fix for [#67] moved .fleet-task* prompt files to os.tmpdir() to prevent them entering member git repos. This works for local members but breaks remote SSH members.
os.tmpdir() is evaluated on the fleet server (e.g. Windows: C:\Users\akhil\AppData\Local\Temp). This path is then used as the location for the fleet-task file when constructing the cd command sent to the remote member. A macOS/Linux remote member receives:
cd: C:\Users\akhil\AppData\Local\Temp: No such file or directory
The temp path must be resolved relative to the member's OS, not the server's OS:
os.tmpdir() on the server is correct (same machine)/tmp (safe on all Linux/macOS targets), or resolve via execute_command → echo $TMPDIR on the member before writing the fileSimplest fix: branch on member_type:
const tmpDir = member.type === 'local' ? os.tmpdir() : '/tmp';
All execute_prompt calls to remote SSH members fail with a path error. Local members are unaffected.
Originally posted by: kumaakh
Fixed in PR [#79] (merged 44d1cb5).
Related
Tickets:
#79Ticket changed by: kumaakh