diff --git a/CHANGELOG b/CHANGELOG index 56e7439a9..c6dac6cc7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,7 +14,7 @@ CHANGELOG Roundcube Webmail - Fix bug where next row wasn't selected after deleting a collapsed thread (#6655) - Fix bug where external content (e.g. mail body) was passed to templates parsing code (#6640) - Fix bug where attachment preview didn't work with x_frame_options=deny (#6688) -- Make use of rcube::raise_error() function for error handling in bin/install-jsdeps.sh (#6704) +- Fix so bin/install-jsdeps.sh returns error code on error (#6704) RELEASE 1.4-rc1 --------------- diff --git a/bin/install-jsdeps.sh b/bin/install-jsdeps.sh index ececc7c27..baac19f60 100755 --- a/bin/install-jsdeps.sh +++ b/bin/install-jsdeps.sh @@ -24,13 +24,14 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); require_once INSTALL_PATH . 'program/include/clisetup.php'; if (!function_exists('exec')) { - rcube::raise_error('PHP exec() function is required. Check disable_functions in php.ini.', false, true); + rcube::raise_error("PHP exec() function is required. Check disable_functions in php.ini.", false, true); } -$SOURCES = json_decode(file_get_contents(INSTALL_PATH . 'jsdeps.json'), true); +$cfgfile = INSTALL_PATH . 'jsdeps.json'; +$SOURCES = json_decode(file_get_contents($cfgfile), true); if (empty($SOURCES['dependencies'])) { - rcube::raise_error("ERROR: Failed to read sources from " . INSTALL_PATH . 'jsdeps.json', false, true); + rcube::raise_error("ERROR: Failed to read dependencies list from $cfgfile", false, true); } $CURL = trim(`which curl`); @@ -116,7 +117,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null) if (!is_readable($cache_file) || !$useCache) { if (empty($CURL) && empty($WGET)) { - rcube::raise_error("Required program 'wget' or 'curl' not found.", false, true); + rcube::raise_error("Required 'wget' or 'curl' program not found.", false, true); } $url = str_replace('$v', $package['version'], $package['url']); @@ -219,7 +220,7 @@ function extract_zipfile($package, $srcfile) global $UNZIP, $CACHEDIR; if (empty($UNZIP)) { - rcube::raise_error("Required program 'unzip' not found.", false, true); + rcube::raise_error("Required 'unzip' program not found.", false, true); } $destdir = INSTALL_PATH . $package['dest']; @@ -228,7 +229,7 @@ function extract_zipfile($package, $srcfile) } if (!is_writeable($destdir)) { - rcube::raise_error("Cannot write to destination directory $destdir", false, true); + rcube::raise_error("Cannot write to destination directory: $destdir", false, true); } // pick files from zip archive