GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Allow PowerShell to start even if Data, Home, and Cache folders cannot be created by SteveL-MSFT · Pull Request #3244 · PowerShell/PowerShell Conversation
Member
Allow Directory Creation failures to continue for Service Account use scenarios that don't have home directories addresses #3011
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While extremely unlikely - this test could cause spurious failures, if for example a background process installed a new module between runs.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think it would sufficient to just check it's greater than 0?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this check can be removed - it would be redundantly checked in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this check can also be removed, though it wouldn't hurt to assert here.
The design is that nobody can call Serialize without going through QueueSerialization, so the check isn't needed here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Will remove and add assert
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I haven't thought through the implications - but should we have a fallback? e.g. $env:TEMP?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This usage is an edge case, I'm not sure how much we want to optimize particularly as one can use the XDG_*_HOME env vars. Also, I don't think it's guaranteed the user account has write access to $env:TEMP so we'd have to check that anyways.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What sort of contract should this api have? If the directory can't be used, should this api return null instead?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Path.Combine() is used often with this api and would have a problem with null. My thinking was that this api returns the expected path which may be used in error message, so even returning an empty string may produce undesired results.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… scenarios that don't have home directories Removed redundant checks if saving to analysis cache Updated test to avoid race condition where a module is added in between checks addresses PowerShell#3011 Removed unnecessary check to save to disk
5fdcbd2 to
aa2edb7
Compare
…os (PowerShell#3244) XDG profile directory creation can fail for accounts that do not have home directories. The module analysis was trying to persist it's cache in an XDG profile directory. The cache is less critical than it once was, so it's reasonable to not cache if there is no good place to do so. Fixes PowerShell#3011
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.