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 PackageTarget.from_str for linux systems #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcanueste
Copy link

Starting the worker on linux systems (NixOS) makes the worker start with unknown target, which breaks the vorpal builds as well.

On linux, the get_default_system function here returns ARCH: x86_64, OS: linux -> 'x86_64-linux', which is then passed to the get_package_system function here.

The get_package_system function contains let target = system.to_lowercase().replace("_", "-"); line here, which converts x86_64-linux to x86-64-linux, which doesn't match any of the PackageTargets.

This PR removes the let target = system.to_lowercase().replace("_", "-"); line since it is not needed, fixing the issue. Also adds tests for the PackageTarget.from_str function on the scheme/src/lib.rs file.

P.S.: Sorry for the late PR 😅

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.

1 participant