From e6a51e3093fd1334c0877ac2cf9f0dbc476d7250 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Thu, 22 Jan 2015 00:26:24 -0600 Subject: [PATCH] (GH-14) Ensure source app called by commands For each command that has run of a command that is listed in ISourceRunners, implement a check to ensure that the application that normally runs for that tool is installed. --- .../infrastructure.app/commands/ChocolateyInstallCommand.cs | 1 + .../infrastructure.app/commands/ChocolateyListCommand.cs | 1 + .../infrastructure.app/commands/ChocolateyUninstallCommand.cs | 1 + .../infrastructure.app/commands/ChocolateyUpgradeCommand.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs index 0e9b1a08f8..bd6bcf4de6 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs @@ -150,6 +150,7 @@ public void noop(ChocolateyConfiguration configuration) public void run(ChocolateyConfiguration configuration) { + _packageService.ensure_source_app_installed(configuration); _packageService.install_run(configuration); } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs index 5a9917996b..c6efee70fa 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs @@ -94,6 +94,7 @@ public void noop(ChocolateyConfiguration configuration) public void run(ChocolateyConfiguration configuration) { + _packageService.ensure_source_app_installed(configuration); _packageService.list_run(configuration, logResults: true); } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs index b6c033a03e..8d9d517ec6 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs @@ -109,6 +109,7 @@ public void noop(ChocolateyConfiguration configuration) public void run(ChocolateyConfiguration configuration) { + _packageService.ensure_source_app_installed(configuration); _packageService.uninstall_run(configuration); } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs index 81d6168452..bbe741491a 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs @@ -119,6 +119,7 @@ public void noop(ChocolateyConfiguration configuration) public void run(ChocolateyConfiguration configuration) { + _packageService.ensure_source_app_installed(configuration); _packageService.upgrade_run(configuration); } }