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

Worker architecture capability added #44

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

Conversation

gopito
Copy link

@gopito gopito commented Aug 26, 2022

Added new worker architecture capability. Only two architectures added "m1" and "x86". If something is wrong "unknown" architecture is set.

Signed-off-by: Anton Smolianin <[email protected]>
enum Arch: String {
case m1 = "Apple M1"
case x86 = "Intel"
case unknown //for m2 .etc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to expose CPU arch (x86_64, arm64), or CPU type, or CPU manufacturer? It seems currently these all are messed up a bit.

I assume it is more beneficial to have arch rather than manufacturer or kind (i.e. Core i5 or i7 or M1 or M2 Pro vs x86_64 and arm64). Could you please update your PR to expose architecture only?

}

extension CommandExecutor {
public func executeCommandWithOutput(env: Dictionary<String,String>, arguments: [String]) throws -> String {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use ProcessControllerProvider to execute subcommands instead of adding another level of abstraction.
https://github.com/avito-tech/CommandLineToolkit/blob/master/Sources/ProcessController/ProcessControllerProvider.swift

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.

2 participants