Skip to content

Commit

Permalink
(GH-14) Allow alternative sources to interact
Browse files Browse the repository at this point in the history
Allow alternative sources to interact with the console.
  • Loading branch information
ferventcoder committed Jun 27, 2015
1 parent 2b588f9 commit 7fa13ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/chocolatey/infrastructure.app/services/CygwinService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
get_exe(_rootDirectory),
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand All @@ -236,7 +237,8 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
if (string.IsNullOrWhiteSpace(logMessage)) return;
this.Log().Error("[{0}] {1}".format_with(APP_NAME, logMessage));
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down
16 changes: 12 additions & 4 deletions src/chocolatey/infrastructure.app/services/PythonService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfigurat
_exePath,
args,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
stdOutAction: (s, e) =>
{
var logMessage = e.Data;
Expand All @@ -297,7 +298,8 @@ public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfigurat
if (string.IsNullOrWhiteSpace(e.Data)) return;
this.Log().Error(() => "{0}".format_with(e.Data));
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

return packageResults;
Expand Down Expand Up @@ -329,6 +331,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
_exePath,
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand Down Expand Up @@ -361,7 +364,8 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
results.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
}
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down Expand Up @@ -401,6 +405,7 @@ public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfigu
_exePath,
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand Down Expand Up @@ -433,7 +438,8 @@ public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfigu
results.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
}
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down Expand Up @@ -466,6 +472,7 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
_exePath,
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand Down Expand Up @@ -498,7 +505,8 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
results.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
}
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfigurat
_exePath,
args,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
stdOutAction: (s, e) =>
{
var logMessage = e.Data;
Expand All @@ -208,7 +209,8 @@ public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfigurat
if (string.IsNullOrWhiteSpace(e.Data)) return;
this.Log().Error(() => "{0}".format_with(e.Data));
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

return packageResults;
Expand Down Expand Up @@ -270,6 +272,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
_exePath,
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand All @@ -295,7 +298,8 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu

results.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down Expand Up @@ -352,6 +356,7 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
_exePath,
argsForPackage,
config.CommandExecutionTimeoutSeconds,
_fileSystem.get_current_directory(),
(s, e) =>
{
var logMessage = e.Data;
Expand All @@ -377,7 +382,8 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi

results.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
},
updateProcessPath: false
updateProcessPath: false,
allowUseWindow: true
);

if (exitCode != 0)
Expand Down

0 comments on commit 7fa13ab

Please sign in to comment.