Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_bin fails even when error = "continue" if executable not in PATH #23

Closed
luciorq opened this issue Jan 23, 2025 · 0 comments
Closed

Comments

@luciorq
Copy link
Owner

luciorq commented Jan 23, 2025

Overview

This is an unexpected error caused by processx::run() that fails even when the error_on_status = FALSE if the command argument doesn't exist on the path.

The error comes from the internal C commands called by processx.

On condathis, we need to rework the rethrow error to capture this case and not throw error when error = "continue" on run_bin().

The error class contains: "c_error" and 'rlib_error_3_0" already captured by `rethrown_error_*().

Steps to reproduce

Ensure you have {condathis} version v0.1.0 installed.

# {condathis} version v0.1.0
run_bin_res <- run_bin(
    "FakeBInFIle", "--version",
    env_name = "fake-env",
    verbose = "silent",
    error = "continue"
  )

Output

Error in `condathis::run_bin()`:
✖ System command FakeBInFIle failed
! Status code: 127
FakeBInFIle: command not found
Run `rlang::last_trace()` to see where the error occurred.

Expected behavior

The error is captured, and the process continues gracefully without stopping execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant