Skip to content

Commit 72909b9

Browse files
committed
Use -NoProfile on PowerShell (fix #3322)
1 parent 09fb11b commit 72909b9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<ImplicitUsings>enable</ImplicitUsings>
44
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
5-
<WindowsSdkPackageVersion>10.0.26100.57</WindowsSdkPackageVersion>
5+
<WindowsSdkPackageVersion>10.0.26100.56</WindowsSdkPackageVersion>
66
<SdkVersion>8.0.405</SdkVersion>
77
<Authors>Martí Climent and the contributors</Authors>
88
<PublisherName>Martí Climent</PublisherName>

src/UniGetUI.PackageEngine.Managers.PowerShell/PowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected override IReadOnlyList<Package> GetAvailableUpdates_UnSafe()
6262
StartInfo = new ProcessStartInfo
6363
{
6464
FileName = Status.ExecutablePath,
65-
Arguments = "",
65+
Arguments = "-NoProfile",
6666
RedirectStandardOutput = true,
6767
RedirectStandardError = true,
6868
RedirectStandardInput = true,
@@ -155,7 +155,7 @@ protected override IReadOnlyList<Package> GetInstalledPackages_UnSafe()
155155
RedirectStandardInput = true,
156156
UseShellExecute = false,
157157
CreateNoWindow = true,
158-
StandardOutputEncoding = System.Text.Encoding.UTF8
158+
StandardOutputEncoding = Encoding.UTF8
159159
}
160160
};
161161

src/UniGetUI.PackageEngine.Managers.PowerShell7/PowerShell7.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected override IReadOnlyList<Package> GetAvailableUpdates_UnSafe()
6262
StartInfo = new ProcessStartInfo
6363
{
6464
FileName = Status.ExecutablePath,
65-
Arguments = "",
65+
Arguments = "-NoProfile",
6666
RedirectStandardOutput = true,
6767
RedirectStandardError = true,
6868
RedirectStandardInput = true,
@@ -275,7 +275,7 @@ protected override ManagerStatus LoadManager()
275275
StartInfo = new ProcessStartInfo
276276
{
277277
FileName = status.ExecutablePath,
278-
Arguments = " -Version",
278+
Arguments = "-NoProfile -Version",
279279
UseShellExecute = false,
280280
RedirectStandardOutput = true,
281281
RedirectStandardError = true,

0 commit comments

Comments
 (0)