Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Experimental Feature PSContentPath#26509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jshigetomi wants to merge19 commits intoPowerShell:master
base:master
Choose a base branch
Loading
fromjshigetomi:PSModulePathFix
Open
Show file tree
Hide file tree
Changes from2 commits
Commits
Show all changes
19 commits
Select commitHold shift + click to select a range
b73eea5
Testing
Mar 13, 2025
805fd0e
Update PSModulePath
Mar 17, 2025
6dc662d
Add Experimental feature for PSContent
jshigetomiAug 6, 2025
67a18aa
Merge branch 'master' into PSModulePathFix
jshigetomiAug 6, 2025
4a7bb3d
Removed unused variables
jshigetomiAug 6, 2025
00b6307
Switch to default PSContentPath LOCALAPPData, cmdlets added
jshigetomiAug 20, 2025
7e5802b
Add lazy migration
jshigetomiOct 2, 2025
830016e
Add null checks incase PSUserContentPath fails to get any value
jshigetomiOct 9, 2025
56acf2d
Able to use expanded environmental variables
jshigetomiOct 14, 2025
3f5709d
Remove help URI
jshigetomiOct 14, 2025
9e516fa
Reassign perUserConfigDirectory if experimental feature is enabled wh…
jshigetomiOct 14, 2025
d371979
Move migration to GetPSContentPath API, added safety fallbacks to def…
jshigetomiNov 21, 2025
c62f82a
Merge branch 'master' into PSModulePathFix
jshigetomiNov 21, 2025
b207b5c
Add tests
jshigetomiDec 1, 2025
8fc45c7
Merge branch 'PSModulePathFix' of https://github.com/jshigetomi/Power…
jshigetomiDec 1, 2025
fb2036c
Merge branch 'master' into PSModulePathFix
jshigetomiDec 1, 2025
eaaaedd
Add initial test cases for PSContentPath
jshigetomiDec 1, 2025
eed1cf3
Fix expanding env variable test
jshigetomiDec 12, 2025
ec18785
Separate commands for env var test
jshigetomiDec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletionssrc/System.Management.Automation/CoreCLR/CorePsPlatform.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -168,9 +168,16 @@ public static bool IsStaSupported
internal static readonly string DefaultPSContentDirectory = Platform.SelectProductNameForDirectory(Platform.XDG_Type.DATA);
#else
// Gets the location for cache and config folders.
internal static readonly string CacheDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Microsoft\PowerShell";
internal static readonly string ConfigDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\PowerShell";
internal static readonly string DefaultPSContentDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\PowerShell";

internal static readonly string CacheDirectory = SafeDeriveFromSpecialFolder(
Environment.SpecialFolder.LocalApplicationData,
@"Microsoft\PowerShell");

internal static readonly string ConfigDirectory = SafeDeriveFromSpecialFolder(
Environment.SpecialFolder.Personal,
@"PowerShell");

private static readonly Lazy<bool> _isStaSupported = new Lazy<bool>(() =>
{
int result = Interop.Windows.CoInitializeEx(IntPtr.Zero, Interop.Windows.COINIT_APARTMENTTHREADED);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,7 @@ public class ExperimentalFeature
internal const string EngineSource = "PSEngine";
internal const string PSSerializeJSONLongEnumAsNumber = nameof(PSSerializeJSONLongEnumAsNumber);
internal const string PSContentPath = "PSContentPath";
internal const string PSProfileDSCResource = "PSProfileDSCResource";

#endregion

Expand DownExpand Up@@ -112,8 +113,10 @@ static ExperimentalFeature()
description: "Serialize enums based on long or ulong as an numeric value rather than the string representation when using ConvertTo-Json."),
new ExperimentalFeature(
name: PSContentPath,
description: "Moves PS content (modules, scripts, help, and profiles) to the new default location in LocalAppData/PowerShell and allows users to specify the content path."
)
description: "Moves PS content (modules, scripts, help, and profiles) to the new default location in LocalAppData/PowerShell and allows users to specify the content path."),
new ExperimentalFeature(
name: PSProfileDSCResource,
description: "DSC v3 resources for managing PowerShell profile.")
};

EngineExperimentalFeatures = new ReadOnlyCollection<ExperimentalFeature>(engineFeatures);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5519,17 +5519,6 @@ private static void InitializeCoreCmdletsAndProviders(
{ "Format-Default", new SessionStateCmdletEntry("Format-Default", typeof(FormatDefaultCommand), helpFile) },
};

if (ExperimentalFeature.IsEnabled("PSSubsystemPluginModel"))
{
cmdlets.Add("Get-PSSubsystem", new SessionStateCmdletEntry("Get-PSSubsystem", typeof(Subsystem.GetPSSubsystemCommand), helpFile));
}

if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSContentPath))
{
cmdlets.Add("Get-PSContentPath", new SessionStateCmdletEntry("Get-PSContentPath", typeof(GetPSContentPathCommand), helpFile));
cmdlets.Add("Set-PSContentPath", new SessionStateCmdletEntry("Set-PSContentPath", typeof(SetPSContentPathCommand), helpFile));
}

#if UNIX
cmdlets.Add("Switch-Process", new SessionStateCmdletEntry("Switch-Process", typeof(SwitchProcessCommand), helpFile));
#endif
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp