Title: Unexpected behavior on folders with no projects · Issue #222 · microsoft/unitysetup.powershell · GitHub
Open Graph Title: Unexpected behavior on folders with no projects · Issue #222 · microsoft/unitysetup.powershell
X Title: Unexpected behavior on folders with no projects · Issue #222 · microsoft/unitysetup.powershell
Description: I was debugging today a problem with our CI environment on my development machine and noticed a strange bug where the Editor was upgrading randomly, not noticing that my terminal went back to my home folder. PS C:\Users\mio> Start-UnityE...
Open Graph Description: I was debugging today a problem with our CI environment on my development machine and noticed a strange bug where the Editor was upgrading randomly, not noticing that my terminal went back to my ho...
X Description: I was debugging today a problem with our CI environment on my development machine and noticed a strange bug where the Editor was upgrading randomly, not noticing that my terminal went back to my ho...
Opengraph URL: https://github.com/microsoft/unitysetup.powershell/issues/222
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected behavior on folders with no projects","articleBody":"I was debugging today a problem with our CI environment on my development machine and noticed a strange bug where the Editor was upgrading randomly, not noticing that my terminal went back to my home folder.\r\n\r\n```pwsh\r\nPS C:\\Users\\mio\u003e Start-UnityEditor -Wait -LogFile build.txt -AdditionalArguments \" -buildPlatform Desktop -buildOutput $PWD\\Build -buildTarget Win64 \" -ExecuteMethod BuildTools.Pipeline.StartCommandLineBuild -Batchmode -WhatIf\r\nWhat if: Performing the operation \"System.Diagnostics.Process.Start()\" on target \"C:\\Program Files\\Unity\\Hub\\Editor\\2020.2.1f1\\Editor\\Unity.exe -executeMethod BuildTools.Pipeline.StartCommandLineBuild -logFile build.txt -batchmode -buildPlatform Desktop -buildOutput C:\\Users\\mio\\Build -buildTarget Win64 \".\r\n```\r\n\r\nThat is no bug per-se, the command line utility selects the latest editor (due to the missing `ProjectVersion.txt`). However, the editor still executes fine - because Unity does store the last opened project somewhere (I'm guessing either by registry key or somewhere in `LocalAppData`), and opens that.\r\n\r\n`Start-UnityEditor` falls back to the latest version, starts the Editor, which then opens the last opened project, no matter which `ProjectVersion.txt`.\r\n\r\n## Reproduction\r\n\r\nExecute `Start-UnityEditor` in a folder that does not contain a Unity project\r\n\r\n## Possible Solutions\r\n\r\n`Start-UnityEditor` should either be able to find the folder that Unity is going to open **or** exit prematurely with an error code that this folder is not a Unity project folder.","author":{"url":"https://github.com/mio-moto","@type":"Person","name":"mio-moto"},"datePublished":"2021-02-05T10:02:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/222/unitysetup.powershell/issues/222"}
| 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:31734f91-6253-0abc-a755-17ff540d3dba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81B4:2BC593:1F631D5:29A9BD3:697D3A25 |
| html-safe-nonce | d5e987291d0a384227e27e6c3a8826e06561d5e7172d236ae14eafbc4686d8b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUI0OjJCQzU5MzoxRjYzMUQ1OjI5QTlCRDM6Njk3RDNBMjUiLCJ2aXNpdG9yX2lkIjoiNjU4Mjc4NzMzMTQyNDMzNjQyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cd815e07a3ee424320f987e796ae69849ea2bc82c0cbb70670b5f7300b7955a7 |
| hovercard-subject-tag | issue:802026994 |
| 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/microsoft/unitysetup.powershell/222/issue_layout |
| twitter:image | https://opengraph.githubassets.com/72ec301fe2b85ad69b8e42af8ac7e47de0779b35c6b0f8f43ef0a7fc4847cb0b/microsoft/unitysetup.powershell/issues/222 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/72ec301fe2b85ad69b8e42af8ac7e47de0779b35c6b0f8f43ef0a7fc4847cb0b/microsoft/unitysetup.powershell/issues/222 |
| og:image:alt | I was debugging today a problem with our CI environment on my development machine and noticed a strange bug where the Editor was upgrading randomly, not noticing that my terminal went back to my ho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mio-moto |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/unitysetup.powershell git https://github.com/microsoft/unitysetup.powershell.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 112545453 |
| octolytics-dimension-repository_nwo | microsoft/unitysetup.powershell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 112545453 |
| octolytics-dimension-repository_network_root_nwo | microsoft/unitysetup.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 | c2b1f969137add620c89ee43eff21bca11243467 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width