Fix sqlite logs

This commit is contained in:
Shivam Mathur 2020-05-17 11:19:52 +05:30
parent 08c60fceea
commit 6cbc46fdb6
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 16 additions and 8 deletions

11
dist/index.js vendored
View File

@ -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;
}

View File

@ -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;
}

View File

@ -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"