From 6cbc46fdb6f9b02e8a5160bfcddf91b24564f97b Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 17 May 2020 11:19:52 +0530 Subject: [PATCH] Fix sqlite logs --- dist/index.js | 11 +++++++---- src/extensions.ts | 11 +++++++---- src/scripts/linux.sh | 2 ++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 962fa3cf..e0c29c57 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2757,7 +2757,7 @@ async function addExtensionDarwin(extension_csv, version, pipe) { break; } add_script += - '\nadd_extension ' + ext_name + ' "' + command + '" ' + ext_prefix; + '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; }); return add_script + remove_script; } @@ -2836,7 +2836,7 @@ async function addExtensionWindows(extension_csv, version) { '\n'; break; default: - add_script += '\nAdd-Extension ' + ext_name; + add_script += '\nAdd-Extension ' + extension; break; } }); @@ -2925,7 +2925,10 @@ async function addExtensionLinux(extension_csv, version, pipe) { return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): - extension = extension.replace('pdo_', '').replace('pdo-', ''); + extension = extension + .replace('pdo_', '') + .replace('pdo-', '') + .replace('sqlite3', 'sqlite'); add_script += '\nadd_pdo_extension ' + extension; return; // match ast and uopz @@ -2942,7 +2945,7 @@ async function addExtensionLinux(extension_csv, version, pipe) { break; } add_script += - '\nadd_extension ' + ext_name + ' "' + command + '" ' + ext_prefix; + '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; }); return add_script + remove_script; } diff --git a/src/extensions.ts b/src/extensions.ts index ea72f2a3..e0af6bef 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -110,7 +110,7 @@ export async function addExtensionDarwin( break; } add_script += - '\nadd_extension ' + ext_name + ' "' + command + '" ' + ext_prefix; + '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; }); return add_script + remove_script; } @@ -198,7 +198,7 @@ export async function addExtensionWindows( '\n'; break; default: - add_script += '\nAdd-Extension ' + ext_name; + add_script += '\nAdd-Extension ' + extension; break; } }); @@ -293,7 +293,10 @@ export async function addExtensionLinux( return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): - extension = extension.replace('pdo_', '').replace('pdo-', ''); + extension = extension + .replace('pdo_', '') + .replace('pdo-', '') + .replace('sqlite3', 'sqlite'); add_script += '\nadd_pdo_extension ' + extension; return; // match ast and uopz @@ -310,7 +313,7 @@ export async function addExtensionLinux( break; } add_script += - '\nadd_extension ' + ext_name + ' "' + command + '" ' + ext_prefix; + '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; }); return add_script + remove_script; } diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 31f7087c..635463f4 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -123,6 +123,8 @@ add_pdo_extension() { if [ "$ext" = "mysql" ]; then enable_extension "mysqlnd" "extension" ext_name="mysqli" + elif [ "$ext" = "sqlite" ]; then + read -r ext ext_name <<< "sqlite3 sqlite3" fi add_extension "$ext_name" "$apt_install php$version-$ext" "extension" >/dev/null 2>&1 enable_extension "$pdo_ext" "extension"