Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make --Open-Logs Stable #2841

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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