Title: Pwsh still corrupts environment variable on Linux Arm 64 · Issue #24693 · PowerShell/PowerShell · GitHub
Open Graph Title: Pwsh still corrupts environment variable on Linux Arm 64 · Issue #24693 · PowerShell/PowerShell
X Title: Pwsh still corrupts environment variable on Linux Arm 64 · Issue #24693 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/24693
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pwsh still corrupts environment variable on Linux Arm 64","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nuse the following docker file building on a Linux Arm machine (I'm using AWS Graviton EC2)\r\n\r\n\u003cpre>FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble-${TARGETARCH}${TARGETVARIANT}\r\nARG TARGETPLATFORM\r\nARG TARGETARCH\r\nARG TARGETVARIANT\r\nARG BUILDVARIANT\r\nARG ARM64ORX64\r\nRUN printf \"I'm building for TARGETPLATFORM=${TARGETPLATFORM}\" \\\r\n&& printf \", TARGETVARIANT=${TARGETVARIANT}\" \\\r\n&& printf \", TARGETARCH=${TARGETARCH}\" \\\r\n&& printf \", BUILDVARIANT=${BUILDVARIANT} \\n\" \\\r\n&& printf \", ARM64ORX64=${ARM64ORX64} \\n\" \\\r\n && printf \"With uname -s : \" && uname -s \\\r\n && printf \"and uname -m : \" && uname -m\r\n\r\nRUN pwsh\r\nRUN pwsh --version\r\nRUN which pwsh\r\nRUN echo $PATH\r\nRUN ls -l /usr/bin/pwsh\r\nRUN pwsh -Command 'Write-Host ${env:PSHOME}'\r\nRUN pwsh -Command 'Write-Host ${env:PATH}'\r\nRUN pwsh -Command 'pwsh -EncodedCommand VwByAGkAdABlAC0ASABvAHMAdAAgACcAaABlAGwAbABvACcA'\r\n\u003c/pre>\r\n\r\nand the following **Exec format error** is output\r\n\r\n\u003cpre> > [10/10] RUN pwsh -Command 'pwsh -EncodedCommand VwByAGkAdABlAC0ASABvAHMAdAAgACcAaABlAGwAbABvACcA':\r\n\r\n[2024-12-18T13:30:25.569Z] 1.392 ResourceUnavailable: Program 'pwsh' failed to run: An error occurred trying to start process '/usr/share/powershell/.store/powershell.linux.arm64/7.5.0-preview.5/powershell.linux.arm64/7.5.0-preview.5/tools/net9.0/any/pwsh' with working directory '/'. Exec format errorAt line:1 char:1\u003c/pre>\r\n\r\nFull docker output : [dockerlog.txt](https://github.com/user-attachments/files/18195619/dockerlog.txt)\r\n\r\n\r\nthis was originally raised via Issue https://github.com/PowerShell/PowerShell/issues/24090 and I thought this was resolved in PR https://github.com/PowerShell/PowerShell/pull/24228\r\n\r\n### Expected behavior\r\n\r\n```console\r\n[2024-12-18T13:27:43.017Z] #13 [10/10] RUN pwsh -Command 'pwsh -EncodedCommand VwByAGkAdABlAC0ASABvAHMAdAAgACcAaABlAGwAbABvACcA'\r\n\r\n\r\nshould output \"hello\"\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\n[2024-12-18T13:30:25.569Z] #13 1.392 ResourceUnavailable: Program 'pwsh' failed to run: An error occurred trying to start process '/usr/share/powershell/.store/powershell.linux.arm64/7.5.0-preview.5/powershell.linux.arm64/7.5.0-preview.5/tools/net9.0/any/pwsh' with working directory '/'. Exec format errorAt line:1 char:1\r\n```\r\n\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```powershell\r\nRUN pwsh $PSVersionTable\r\n\r\n[2024-12-19T10:04:36.769Z] #11 0.636 PowerShell 7.5.0-preview.5\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/SleepyFoxStudio","@type":"Person","name":"SleepyFoxStudio"},"datePublished":"2024-12-19T10:09:15Z","url":"https://github.com/PowerShell/PowerShell/issues/24693"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1b613b8d-b032-5870-7827-5d2700ff82d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 842A:2AABF1:21B9C96:2F40E08:6AFD31D1 |
| html-safe-nonce | 547f9d445c236e96756fc866c5c619f3bc0fbe52bf4e725d27894c1ccf7846f1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDJBOjJBQUJGMToyMUI5Qzk2OjJGNDBFMDg6NkFGRDMxRDEiLCJ2aXNpdG9yX2lkIjoiNTQ3ODA5MTM3MzIwNDU1MDA5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 96e2222ba21fc2fdf786731a8440009658f83dc508de9ca539237788d7f090de |
| hovercard-subject-tag | issue:2749825303 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/24693/issue_layout |
| twitter:image | https://opengraph.githubassets.com/594c5f1706be87439b2b2ee34f535eef8a984c32fd5d11faf9d7c118e9a23f70/PowerShell/PowerShell/issues/24693 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/594c5f1706be87439b2b2ee34f535eef8a984c32fd5d11faf9d7c118e9a23f70/PowerShell/PowerShell/issues/24693 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SleepyFoxStudio |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width