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

Overwrite arch with x86_64 in case of i386 #1084

Draft
wants to merge 3 commits into
base: ng
Choose a base branch
from

Conversation

SimonCW
Copy link
Contributor

@SimonCW SimonCW commented Mar 16, 2023

All Submissions:

  • Did you update the changelog.adoc?
  • Does your PR affect the documentation?
  • If yes, did you update the documentation or create an issue for updating it?

The source of the documentation can be found in /src/docs/.

If you didn't find the time to update docs, please create an issue as reminder to do so.

Your first submission

  • Welcome to the list of contributors! If you have any questions, feel free to ask them by creating a new issue
  • Have you added your name to the list of 30_community.adoc?

As discussed here: #1082

@netlify
Copy link

netlify bot commented Mar 16, 2023

Deploy Preview for dtc-docs-preview ready!

Name Link
🔨 Latest commit 372f53a
🔍 Latest deploy log https://app.netlify.com/sites/dtc-docs-preview/deploys/641392adb2557d000863dd87
😎 Deploy Preview https://deploy-preview-1084--dtc-docs-preview.netlify.app/10_about/30_community
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@SimonCW SimonCW marked this pull request as draft March 16, 2023 10:38
@mh182 mh182 linked an issue Mar 16, 2023 that may be closed by this pull request
@rdmueller
Copy link
Member

on a windows machine, arch will return x86_64, so this mod will be fine

@rdmueller rdmueller requested a review from mh182 March 16, 2023 22:05
@rdmueller
Copy link
Member

@mh182 please merge if you also think this is ok

@mh182
Copy link
Collaborator

mh182 commented Mar 17, 2023

To be honest, just looking at those 5 lines of codes, in a couple of weeks, no one is going to understand them. At least I would not.

man arch gives me arch - print machine hardware name (same as uname -m).

So if we don't provide some context with the code (and maybe a reference to ticket #1082) I would refactor the code and delete those lines in a couple of weeks.

@SimonCW So how about providing a bit of documentation and explain why we have this strange code in there?

dtcw Show resolved Hide resolved
@SimonCW
Copy link
Contributor Author

SimonCW commented Mar 17, 2023

TBH, I'm not sure whether it should be in there at all. It might be that it is just a weirdness of my config on my Mac that it outputs:

$ arch -x86_64 /bin/zsh
$ arch
i386
$ uname -m
arm64

I didn't have time to investigate on my machine or research whether this is expected behavior. Just wanted to share my solution. I can check with a few colleagues that have the same machine next week. And try to find out how reliable arch / uname is for determining architecture.

Screenshot_20230317-090235.png

😜

@rdmueller
Copy link
Member

So, regarding the answer of chatgpt, uname -m is the wrong thing to do and it should always reflect the hardware architecture not the one of the emulator?

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.

Not able to use dtcw on arm64 / apple silicone
3 participants