Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Claude Code Instructions for dtvem

## Deployment

After building, always deploy both executables to the user's installation directory:

```bash
cp dist/dtvem.exe ~/.dtvem/bin/dtvem.exe
cp dist/shim.exe ~/.dtvem/bin/dtvem-shim.exe
~/.dtvem/bin/dtvem.exe reshim
```

The `reshim` command must be run after deploying the shim to regenerate all runtime shims (npm, node, python, etc.) with the updated binary.
12 changes: 11 additions & 1 deletion src/cmd/shim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,17 @@ func executeCommand(execPath string, args []string) error {
Stdout: os.Stdout,
Stderr: os.Stderr,
}
return cmd.Run()
if err := cmd.Run(); err != nil {
// Check if this is an exit error (command ran but returned non-zero)
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
// Command executed successfully but returned non-zero exit code
// This is not a shim error - propagate the exit code
os.Exit(exitErr.ExitCode())
}
// Other errors (couldn't start, etc.) are actual failures
return err
}
}

return nil
Expand Down