From f037ba85c99f5e42634b070bca4be9abd6e02732 Mon Sep 17 00:00:00 2001 From: TheCakeIsNaOH Date: Thu, 10 Mar 2022 00:12:18 -0600 Subject: [PATCH] (maint) formatting --- .../services/CygwinService.cs | 8 ++++---- .../services/ISourceRunner.cs | 8 ++++---- .../services/PythonService.cs | 14 +++++++------- .../services/RubyGemsService.cs | 18 +++++++++--------- .../services/WebPiService.cs | 12 ++++++------ .../services/WindowsFeatureService.cs | 8 ++++---- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/chocolatey/infrastructure.app/services/CygwinService.cs b/src/chocolatey/infrastructure.app/services/CygwinService.cs index bf9d6583fa..4de3bb9716 100644 --- a/src/chocolatey/infrastructure.app/services/CygwinService.cs +++ b/src/chocolatey/infrastructure.app/services/CygwinService.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/chocolatey/infrastructure.app/services/ISourceRunner.cs b/src/chocolatey/infrastructure.app/services/ISourceRunner.cs index 0d347d66ba..316502902d 100644 --- a/src/chocolatey/infrastructure.app/services/ISourceRunner.cs +++ b/src/chocolatey/infrastructure.app/services/ISourceRunner.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/chocolatey/infrastructure.app/services/PythonService.cs b/src/chocolatey/infrastructure.app/services/PythonService.cs index ccdd76ce36..2c953117b1 100644 --- a/src/chocolatey/infrastructure.app/services/PythonService.cs +++ b/src/chocolatey/infrastructure.app/services/PythonService.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -233,7 +233,7 @@ public void set_executable_path_if_not_set() return; } } - + var topLevelPath = string.Empty; var python34PathKey = _registryService.get_key(RegistryHive.LocalMachine, "SOFTWARE\\Python\\PythonCore\\3.4\\InstallPath"); if (python34PathKey != null) @@ -248,7 +248,7 @@ public void set_executable_path_if_not_set() topLevelPath = python27PathKey.GetValue("", string.Empty).to_string(); } } - + if (string.IsNullOrWhiteSpace(topLevelPath)) { var binRoot = Environment.GetEnvironmentVariable("ChocolateyBinRoot"); @@ -262,7 +262,7 @@ public void set_executable_path_if_not_set() { _exePath = pipPath; } - + if (string.IsNullOrWhiteSpace(_exePath)) throw new FileNotFoundException("Unable to find pip"); } diff --git a/src/chocolatey/infrastructure.app/services/RubyGemsService.cs b/src/chocolatey/infrastructure.app/services/RubyGemsService.cs index bf7eae186b..3f6d1ce7be 100644 --- a/src/chocolatey/infrastructure.app/services/RubyGemsService.cs +++ b/src/chocolatey/infrastructure.app/services/RubyGemsService.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -91,14 +91,14 @@ private void set_install_dictionary(IDictionary UseValueOnly = true, Required = true }); - + args.Add("Force", new ExternalCommandArgument { ArgumentOption = "-f ", QuoteValue = false, Required = false }); - + args.Add("Version", new ExternalCommandArgument { ArgumentOption = "--version ", @@ -160,7 +160,7 @@ public IEnumerable list_run(ChocolateyConfiguration config) { var packageResults = new List(); var args = ExternalCommandArgsBuilder.build_arguments(config, _listArguments); - + Environment.ExitCode = _commandExecutor.execute( EXE_PATH, args, @@ -213,7 +213,7 @@ public ConcurrentDictionary install_run(ChocolateyConfigu var logMessage = e.Data; if (string.IsNullOrWhiteSpace(logMessage)) return; this.Log().Info(() => " [{0}] {1}".format_with(APP_NAME, logMessage.escape_curly_braces())); - + if (InstallingRegex.IsMatch(logMessage)) { var packageName = get_value_from_output(logMessage, PackageNameFetchingRegex, PACKAGE_NAME_GROUP); @@ -221,7 +221,7 @@ public ConcurrentDictionary install_run(ChocolateyConfigu this.Log().Info(ChocolateyLoggers.Important, "{0}".format_with(packageName)); return; } - + //if (string.IsNullOrWhiteSpace(packageName)) return; if (InstalledRegex.IsMatch(logMessage)) diff --git a/src/chocolatey/infrastructure.app/services/WebPiService.cs b/src/chocolatey/infrastructure.app/services/WebPiService.cs index 405c6ba8b2..70fd305684 100644 --- a/src/chocolatey/infrastructure.app/services/WebPiService.cs +++ b/src/chocolatey/infrastructure.app/services/WebPiService.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,7 +42,7 @@ public sealed class WebPiService : ISourceRunner public static readonly Regex AlreadyInstalledRegex = new Regex(@"No products to be installed \(either not available or already installed\)", RegexOptions.Compiled); //public static readonly Regex NotInstalled = new Regex(@"not installed", RegexOptions.Compiled); public static readonly Regex PackageNameRegex = new Regex(@"'(?<{0}>[^']*)'".format_with(PACKAGE_NAME_GROUP), RegexOptions.Compiled); - + private readonly IDictionary _listArguments = new Dictionary(StringComparer.InvariantCultureIgnoreCase); private readonly IDictionary _installArguments = new Dictionary(StringComparer.InvariantCultureIgnoreCase); @@ -228,7 +228,7 @@ public ConcurrentDictionary install_run(ChocolateyConfigu this.Log().Info(ChocolateyLoggers.Important, "{0}".format_with(packageName)); return; } - + if (InstalledRegex.IsMatch(logMessage)) { this.Log().Info(ChocolateyLoggers.Important, " {0} has been installed successfully.".format_with(string.IsNullOrWhiteSpace(packageName) ? packageToInstall : packageName)); diff --git a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs index bcaa78fdbb..1011ff8824 100644 --- a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs +++ b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs @@ -1,13 +1,13 @@ // Copyright © 2017 - 2021 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. -// +// // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.