Some code cleanup work (#10698)

* Move Utils.GetUserConfigurationDirectory to Platform.ConfigDirectory
* Unify the use of Platform.ConfigDirectory and Platform.CacheDirectory
This commit is contained in:
Dongbo Wang authored and Ilya committed 2019-10-07 14:15:01 +05:00
1 parent 8cf9c01800
commit ec105da3f1
11 files changed
+33 -62

No files matched your search

@@ -9,7 +9,7 @@ Describe "Telemetry for shell startup" -Tag CI {
BeforeAll {
# if the telemetry file exists, move it out of the way
# the member is internal, but we can retrieve it via reflection
$cacheDir = [System.Management.Automation.Platform].GetMember("CacheDirectory","NonPublic,Static").GetMethod.Invoke($null, $null)
$cacheDir = [System.Management.Automation.Platform].GetField("CacheDirectory","NonPublic,Static").GetValue($null)
$uuidPath = Join-Path -Path $cacheDir -ChildPath telemetry.uuid
$uuidFileExists = Test-Path -Path $uuidPath
if ( $uuidFileExists ) {