Skip to content

Commit

Permalink
(maint) formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCakeIsNaOH committed Mar 10, 2022
1 parent d31826d commit f037ba8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions src/chocolatey/infrastructure.app/services/CygwinService.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/chocolatey/infrastructure.app/services/ISourceRunner.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 7 additions & 7 deletions src/chocolatey/infrastructure.app/services/PythonService.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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");
Expand All @@ -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");
}

Expand Down
18 changes: 9 additions & 9 deletions src/chocolatey/infrastructure.app/services/RubyGemsService.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -91,14 +91,14 @@ private void set_install_dictionary(IDictionary<string, ExternalCommandArgument>
UseValueOnly = true,
Required = true
});

args.Add("Force", new ExternalCommandArgument
{
ArgumentOption = "-f ",
QuoteValue = false,
Required = false
});

args.Add("Version", new ExternalCommandArgument
{
ArgumentOption = "--version ",
Expand Down Expand Up @@ -160,7 +160,7 @@ public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config)
{
var packageResults = new List<PackageResult>();
var args = ExternalCommandArgsBuilder.build_arguments(config, _listArguments);

Environment.ExitCode = _commandExecutor.execute(
EXE_PATH,
args,
Expand Down Expand Up @@ -213,15 +213,15 @@ public ConcurrentDictionary<string, PackageResult> 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);
var results = packageResults.GetOrAdd(packageName, new PackageResult(packageName, null, null));
this.Log().Info(ChocolateyLoggers.Important, "{0}".format_with(packageName));
return;
}

//if (string.IsNullOrWhiteSpace(packageName)) return;

if (InstalledRegex.IsMatch(logMessage))
Expand Down
12 changes: 6 additions & 6 deletions src/chocolatey/infrastructure.app/services/WebPiService.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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<string, ExternalCommandArgument> _listArguments = new Dictionary<string, ExternalCommandArgument>(StringComparer.InvariantCultureIgnoreCase);
private readonly IDictionary<string, ExternalCommandArgument> _installArguments = new Dictionary<string, ExternalCommandArgument>(StringComparer.InvariantCultureIgnoreCase);

Expand Down Expand Up @@ -228,7 +228,7 @@ public ConcurrentDictionary<string, PackageResult> 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));
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit f037ba8

Please sign in to comment.