diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2016-12-13 20:45:48 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-12-16 17:50:58 +0100 |
commit | 876754a5a55e076a56e98e4ed3fc7e82589e2afa (patch) | |
tree | 1a7319a5bf8f79fc83fc1ab81b54511e5d55d826 /core/Command/Integrity/SignApp.php | |
parent | b0c1460a1d7d71cb752637b42154cd515c2b489e (diff) | |
download | nextcloud-server-876754a5a55e076a56e98e4ed3fc7e82589e2afa.tar.gz nextcloud-server-876754a5a55e076a56e98e4ed3fc7e82589e2afa.zip |
Check return value for file_put_contents. Add return value to the commands
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'core/Command/Integrity/SignApp.php')
-rw-r--r-- | core/Command/Integrity/SignApp.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php index 3bc79eb0114..26d2791475b 100644 --- a/core/Command/Integrity/SignApp.php +++ b/core/Command/Integrity/SignApp.php @@ -101,8 +101,13 @@ class SignApp extends Command { $x509 = new X509(); $x509->loadX509($keyBundle); $x509->setPrivateKey($rsa); - $this->checker->writeAppSignature($path, $x509, $rsa); - - $output->writeln('Successfully signed "'.$path.'"'); + try { + $this->checker->writeAppSignature($path, $x509, $rsa); + $output->writeln('Successfully signed "'.$path.'"'); + } catch (\Exception $e){ + $output->writeln('Error: ' . $e->getMessage()); + return 1; + } + return 0; } } |