Title: System.IO.DirectoryNotFoundException using -Parallel feature and Microsoft.PowerShell.SDK · Issue #13189 · PowerShell/PowerShell · GitHub
Open Graph Title: System.IO.DirectoryNotFoundException using -Parallel feature and Microsoft.PowerShell.SDK · Issue #13189 · PowerShell/PowerShell
X Title: System.IO.DirectoryNotFoundException using -Parallel feature and Microsoft.PowerShell.SDK · Issue #13189 · PowerShell/PowerShell
Description: This is a part 2 of #13132. I'm running PowerShell scripts using executed from a .NET program using Microsoft.PowerShell.SDK. The package bundle is created using --runtime linux-x64 switch with dotnet publish. Initially I it was always f...
Open Graph Description: This is a part 2 of #13132. I'm running PowerShell scripts using executed from a .NET program using Microsoft.PowerShell.SDK. The package bundle is created using --runtime linux-x64 switch with dot...
X Description: This is a part 2 of #13132. I'm running PowerShell scripts using executed from a .NET program using Microsoft.PowerShell.SDK. The package bundle is created using --runtime linux-x64 switch with...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/13189
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"System.IO.DirectoryNotFoundException using -Parallel feature and Microsoft.PowerShell.SDK","articleBody":"This is a part 2 of https://github.com/PowerShell/PowerShell/issues/13132. I'm running PowerShell scripts using executed from a .NET program using **Microsoft.PowerShell.SDK**. The package bundle is created using `--runtime linux-x64` switch with `dotnet publish`.\r\n\r\nInitially I it was always failing and with the previous issue it was discovered I need to move the Modules folder in the runtimes folder up to the root of the publish folder.\r\n\r\nNow that I have implemented that workaround of moving the Module folder to the root of the publish folder I'm getting the following error about 10% of the time. \r\n\r\nThe repo is the same as is explained in the https://github.com/PowerShell/PowerShell/issues/13132 except before executing the `runtimes/win/lib/netcoreapp3.1/Modules` folder is copied up to root of the publish folder.\r\n\r\n@daxian-dbw\r\n\r\n\r\n```\r\n2020-07-15 23:21:04: [Error] - An unexpected error has occurred while processing ForEach-Object -Parallel input. This may mean that some of the piped input did not get processed. Error: System.IO.DirectoryNotFoundException: Could not find a part of the path '/tmp/32029fe7-1d55-4203-bdb1-898dfea7c7d0/.local/share/powershell/Modules'.\r\n at System.IO.FileSystem.CreateDirectory(String fullPath)\r\n at System.IO.Directory.CreateDirectory(String path)\r\n at System.Management.Automation.Platform.SelectProductNameForDirectory(XDG_Type dirpath)\r\n at System.Management.Automation.ModuleIntrinsics.GetPersonalModulePath()\r\n at System.Management.Automation.ModuleIntrinsics.GetModulePath(String currentProcessModulePath, String hklmMachineModulePath, String hkcuUserModulePath)\r\n at System.Management.Automation.ModuleIntrinsics.SetModulePath()\r\n at System.Management.Automation.ModuleIntrinsics..ctor(ExecutionContext context)\r\n at System.Management.Automation.ExecutionContext.InitializeCommon(AutomationEngine engine, PSHost hostInterface)\r\n at System.Management.Automation.ExecutionContext..ctor(AutomationEngine engine, PSHost hostInterface, InitialSessionState initialSessionState)\r\n at System.Management.Automation.AutomationEngine..ctor(PSHost hostInterface, InitialSessionState iss)\r\n at System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()\r\n at System.Management.Automation.Runspaces.LocalRunspace.OpenHelper(Boolean syncCall)\r\n at System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall)\r\n at System.Management.Automation.Runspaces.RunspaceBase.Open()\r\n at System.Management.Automation.PSTasks.PSTaskBase.Start()\r\n at System.Management.Automation.PSTasks.PSTaskPool.Add(PSTaskBase task)\r\n at Microsoft.PowerShell.Commands.ForEachObjectCommand.\u003cInitParallelParameterSet>b__63_2(Object _).\r\n\r\n```\r\n\r\n\r\n## Environment data\r\n\r\n```json\r\n{\r\n \"SerializationVersion\": {\r\n \"Major\": 1,\r\n \"Minor\": 1,\r\n \"Build\": 0,\r\n \"Revision\": 1,\r\n \"MajorRevision\": 0,\r\n \"MinorRevision\": 1\r\n },\r\n \"WSManStackVersion\": {\r\n \"Major\": 3,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n \"PSCompatibleVersions\": [\r\n {\r\n \"Major\": 1,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 2,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 3,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 4,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 5,\r\n \"Minor\": 0,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 5,\r\n \"Minor\": 1,\r\n \"Build\": 10032,\r\n \"Revision\": 0,\r\n \"MajorRevision\": 0,\r\n \"MinorRevision\": 0\r\n },\r\n {\r\n \"Major\": 6,\r\n \"Minor\": 0,\r\n \"Build\": 0,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 6,\r\n \"Minor\": 1,\r\n \"Build\": 0,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 6,\r\n \"Minor\": 2,\r\n \"Build\": 0,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n {\r\n \"Major\": 7,\r\n \"Minor\": 0,\r\n \"Build\": 2,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n }\r\n ],\r\n \"Platform\": \"Unix\",\r\n \"GitCommitId\": \"7.0.2\",\r\n \"PSRemotingProtocolVersion\": {\r\n \"Major\": 2,\r\n \"Minor\": 3,\r\n \"Build\": -1,\r\n \"Revision\": -1,\r\n \"MajorRevision\": -1,\r\n \"MinorRevision\": -1\r\n },\r\n \"PSVersion\": {\r\n \"Major\": 7,\r\n \"Minor\": 0,\r\n \"Patch\": 2,\r\n \"PreReleaseLabel\": null,\r\n \"BuildLabel\": null\r\n },\r\n \"PSEdition\": \"Core\",\r\n \"OS\": \"Linux 4.14.165-102.205.amzn2.x86_64 #1 SMP Fri Feb 14 22:46:57 UTC 2020\"\r\n}\r\n```","author":{"url":"https://github.com/normj","@type":"Person","name":"normj"},"datePublished":"2020-07-16T06:50:15Z","url":"https://github.com/PowerShell/PowerShell/issues/13189"}
| 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:a7daac08-942a-e5b2-ae5a-2880bb7f1efc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94B4:306F98:1CCE60:293A94:6AFDDC24 |
| html-safe-nonce | 7ac022174fa20aacd06cea62129925733c87a320d103a4da171a197c48cc3c34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEI0OjMwNkY5ODoxQ0NFNjA6MjkzQTk0OjZBRkREQzI0IiwidmlzaXRvcl9pZCI6IjYwNjIxMjMwOTYyODg5MTAzNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d59ad3748db2721269baf1e827cb92dfc1e5747e0b96a773b20e509831a5e65a |
| hovercard-subject-tag | issue:657899251 |
| 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/13189/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6311ea0a37ec4b05c32478746cb16c350a52d3fd2acf866b62d2882d93b06d09/PowerShell/PowerShell/issues/13189 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6311ea0a37ec4b05c32478746cb16c350a52d3fd2acf866b62d2882d93b06d09/PowerShell/PowerShell/issues/13189 |
| og:image:alt | This is a part 2 of #13132. I'm running PowerShell scripts using executed from a .NET program using Microsoft.PowerShell.SDK. The package bundle is created using --runtime linux-x64 switch with dot... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | normj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23 |
| 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 | a231c174493a6a442c0b0544475c918b30128208 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width