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

fix: Do not use absolute paths to the postprocessors #597

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

lens0021
Copy link
Contributor

@lens0021 lens0021 commented Nov 15, 2024

If any postprocessor is not installed at the exact path(ex: ~/.local/bin/bshchk), the cargo test tests::postprocessor::default_ok fails:

running 1 test
test tests::postprocessor::default_ok ... FAILED

failures:

---- tests::postprocessor::default_ok stdout ----
thread 'tests::postprocessor::default_ok' panicked at src/tests/postprocessor.rs:21:5:
These commands have to be in $PATH for this test to pass: bshchk
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    tests::postprocessor::default_ok

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 222 filtered out; finished in 0.00s

This PR omits /usr/bin/.

If program is not an absolute path, the PATH will be searched in an OS-defined way.
-- Struct std::process::Command

@Mte90
Copy link
Member

Mte90 commented Nov 15, 2024

I think that change was implemented for Windows, what do you think @hdwalters @b1ek?

I had the same issue but I resolved with a symlink locally.

@Mte90 Mte90 requested review from b1ek and hdwalters November 15, 2024 11:51
@hdwalters
Copy link
Contributor

hdwalters commented Nov 15, 2024

I think that change was implemented for Windows, what do you think @hdwalters @b1ek?

I had the same issue but I resolved with a symlink locally.

The hard coded path was added by @b1ek as part of the recent postprocessor update. The change in this PR looks ok to me.

src/compiler/postprocessor.rs Show resolved Hide resolved
@hdwalters hdwalters changed the title fix: Do not use absoulte paths to the postprocessors fix: Do not use absolute paths to the postprocessors Nov 15, 2024
@b1ek b1ek merged commit 7219c34 into amber-lang:master Nov 16, 2024
1 check passed
@lens0021 lens0021 deleted the postprocessor-path branch November 16, 2024 01:33
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

Successfully merging this pull request may close these issues.

4 participants