Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-08 18:18:36 +0300
committerJoas Schilling <coding@schilljs.com>2019-04-08 18:18:36 +0300
commit89dea30e78825cdf1418693cee9a039dee9b42b8 (patch)
treedcfc380c465eeb1ec33827eecd9e430775e22c5b /lib/Command
parente267c6be4fe7bf116e64d50a0e08d8dee839d3bd (diff)
Check bc before trying to install the command
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Command')
-rw-r--r--lib/Command/Command/AddSamples.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Command/Command/AddSamples.php b/lib/Command/Command/AddSamples.php
index 96d9801da..9b30b6ce4 100644
--- a/lib/Command/Command/AddSamples.php
+++ b/lib/Command/Command/AddSamples.php
@@ -73,6 +73,8 @@ class AddSamples extends Base {
$chmod = fileperms($appPath . '/sample-commands/calc.sh');
if (!($chmod & 0x0040 || $chmod & 0x0008 || $chmod & 0x0001)) {
$output->writeln('<error>sample-commands/calc.sh is not executable</error>');
+ } else if (!shell_exec('which bc')) {
+ $output->writeln('<error>Can not add calculator command, because Basic calculator package (bc - https://www.gnu.org/software/bc/) is missing</error>');
} else {
$this->installCommand(
$output,