Skip to content

Commit

Permalink
Make --OpenLogs Stable (#2841)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trenly authored Jan 12, 2023
1 parent 939e4dd commit 25857a8
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 30 deletions.
11 changes: 0 additions & 11 deletions doc/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,6 @@ You can enable the feature as shown below.
},
```

### openLogsArgument

This feature enables the Windows Package Manager to open the default logs folder after execution by passing the `--open-logs` argument with any command.
You can enable the feature as shown below.

```json
"experimentalFeatures": {
"openLogsArgument": true
},
```

### uninstallPreviousArgument

This feature enables the Windows Package Manager to override the upgrade behavior to UninstallPrevious by passing the `--uninstall-previous` argument with the upgrade or install command.
Expand Down
5 changes: 0 additions & 5 deletions schemas/JSON/settings/settings.schema.0.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@
"type": "boolean",
"default": false
},
"openLogsArgument": {
"description": "Enable argument to open default logs location",
"type": "boolean",
"default": false
},
"uninstallPreviousArgument": {
"description": "Enable argument to override upgrade behavior to UninstallPrevious",
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ namespace AppInstaller::CLI
case Args::Type::ProductCode:
return Argument{ "product-code"_liv, NoAlias, Args::Type::ProductCode, Resource::String::ProductCodeArgumentDescription, ArgumentType::Standard, false };
case Args::Type::OpenLogs:
return Argument{ "open-logs"_liv, NoAlias, "logs"_liv, Args::Type::OpenLogs, Resource::String::OpenLogsArgumentDescription, ArgumentType::Flag, ExperimentalFeature::Feature::OpenLogsArgument};
return Argument{ "open-logs"_liv, NoAlias, "logs"_liv, Args::Type::OpenLogs, Resource::String::OpenLogsArgumentDescription, ArgumentType::Flag, Argument::Visibility::Help};
case Args::Type::UninstallPrevious:
return Argument{ "uninstall-previous"_liv, NoAlias, Args::Type::UninstallPrevious, Resource::String::UninstallPreviousArgumentDescription, ArgumentType::Flag, ExperimentalFeature::Feature::UninstallPreviousArgument };
case Args::Type::Force:
Expand Down
1 change: 0 additions & 1 deletion src/AppInstallerCLIE2ETests/FeaturesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public void EnableExperimentalFeatures()
WinGetSettingsHelper.ConfigureFeature("experimentalArg", true);
WinGetSettingsHelper.ConfigureFeature("experimentalCmd", true);
WinGetSettingsHelper.ConfigureFeature("directMSI", true);
WinGetSettingsHelper.ConfigureFeature("openLogsArgument", true);
WinGetSettingsHelper.ConfigureFeature("uninstallPreviousArgument", true);
var result = TestCommon.RunAICLICommand("features", string.Empty);
Assert.True(result.StdOut.Contains("Enabled"));
Expand Down
2 changes: 0 additions & 2 deletions src/AppInstallerCLIE2ETests/WinGetSettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static void InitializeWingetSettings()
{ "experimentalCmd", false },
{ "dependencies", false },
{ "directMSI", false },
{ "openLogsArgument", false },
}
},
{
Expand Down Expand Up @@ -136,7 +135,6 @@ public static void InitializeAllFeatures(bool status)
ConfigureFeature("experimentalCmd", status);
ConfigureFeature("dependencies", status);
ConfigureFeature("directMSI", status);
ConfigureFeature("openLogsArgument", status);
}
}
}
4 changes: 0 additions & 4 deletions src/AppInstallerCommonCore/ExperimentalFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ namespace AppInstaller::Settings
return userSettings.Get<Setting::EFDependencies>();
case ExperimentalFeature::Feature::DirectMSI:
return userSettings.Get<Setting::EFDirectMSI>();
case ExperimentalFeature::Feature::OpenLogsArgument:
return userSettings.Get<Setting::EFOpenLogsArgument>();
case ExperimentalFeature::Feature::Pinning:
return userSettings.Get<Setting::EFPinning>();
case ExperimentalFeature::Feature::UninstallPreviousArgument:
Expand Down Expand Up @@ -79,8 +77,6 @@ namespace AppInstaller::Settings
return ExperimentalFeature{ "Show Dependencies Information", "dependencies", "https://aka.ms/winget-settings", Feature::Dependencies };
case Feature::DirectMSI:
return ExperimentalFeature{ "Direct MSI Installation", "directMSI", "https://aka.ms/winget-settings", Feature::DirectMSI };
case Feature::OpenLogsArgument:
return ExperimentalFeature{ "Open Logs Argument", "openLogsArgument", "https://aka.ms/winget-settings", Feature::OpenLogsArgument };
case Feature::Pinning:
return ExperimentalFeature{ "Package Pinning", "pinning", "https://aka.ms/winget-settings", Feature::Pinning};
case Feature::UninstallPreviousArgument:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ namespace AppInstaller::Settings
Dependencies = 0x1,
// Before making DirectMSI non-experimental, it should be part of manifest validation.
DirectMSI = 0x2,
OpenLogsArgument = 0x4,
Pinning = 0x8,
UninstallPreviousArgument = 0x10,
Pinning = 0x4,
UninstallPreviousArgument = 0x8,
Max, // This MUST always be after all experimental features

// Features listed after Max will not be shown with the features command
Expand Down
2 changes: 0 additions & 2 deletions src/AppInstallerCommonCore/Public/winget/UserSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ namespace AppInstaller::Settings
EFExperimentalArg,
EFDependencies,
EFDirectMSI,
EFOpenLogsArgument,
EFPinning,
EFUninstallPreviousArgument,
// Telemetry
Expand Down Expand Up @@ -147,7 +146,6 @@ namespace AppInstaller::Settings
SETTINGMAPPING_SPECIALIZATION(Setting::EFExperimentalArg, bool, bool, false, ".experimentalFeatures.experimentalArg"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFDependencies, bool, bool, false, ".experimentalFeatures.dependencies"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFDirectMSI, bool, bool, false, ".experimentalFeatures.directMSI"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFOpenLogsArgument, bool, bool, false, ".experimentalFeatures.openLogsArgument"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFPinning, bool, bool, false, ".experimentalFeatures.pinning"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFUninstallPreviousArgument, bool, bool, false, ".experimentalFeatures.uninstallPreviousArgument"sv);
// Telemetry
Expand Down
1 change: 0 additions & 1 deletion src/AppInstallerCommonCore/UserSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ namespace AppInstaller::Settings
WINGET_VALIDATE_PASS_THROUGH(EFExperimentalArg)
WINGET_VALIDATE_PASS_THROUGH(EFDependencies)
WINGET_VALIDATE_PASS_THROUGH(EFDirectMSI)
WINGET_VALIDATE_PASS_THROUGH(EFOpenLogsArgument)
WINGET_VALIDATE_PASS_THROUGH(EFPinning)
WINGET_VALIDATE_PASS_THROUGH(EFUninstallPreviousArgument)
WINGET_VALIDATE_PASS_THROUGH(TelemetryDisable)
Expand Down

0 comments on commit 25857a8

Please sign in to comment.