summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-12 15:51:33 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-13 10:51:48 +0200
commit1675542df4a1cfb203dfcbe2393b559577043803 (patch)
tree9744e7177478735dd7ff0ffa17e69f2a49df847a /core/Command
parent0543661064b00c27c2e9a1780acf34c8a364f6ce (diff)
downloadnextcloud-server-1675542df4a1cfb203dfcbe2393b559577043803.tar.gz
nextcloud-server-1675542df4a1cfb203dfcbe2393b559577043803.zip
Display an error when updating .htaccess failed
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Maintenance/UpdateHtaccess.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
index 21850786200..89eeb7ccf5b 100644
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ b/core/Command/Maintenance/UpdateHtaccess.php
@@ -38,8 +38,12 @@ class UpdateHtaccess extends Command {
}
protected function execute(InputInterface $input, OutputInterface $output) {
- \OC\Setup::updateHtaccess();
- $output->writeln('.htaccess has been updated');
- return 0;
+ if (\OC\Setup::updateHtaccess()) {
+ $output->writeln('.htaccess has been updated');
+ return 0;
+ } else {
+ $output->writeln('<error>Error updating .htaccess file, not enough permissions?</error>');
+ return 1;
+ }
}
}