6262--- Checks if a conflicting version of a package is installed.
6363-- This checks if there is an equivalent or higher version of a package is installed.
6464-- If one is not detected, installation continues.
65- --- @param package_table A valid package table
65+ --- @param package_table table A valid package table
6666local function check_installable (package_table )
6767 local existing_package = getPackageData (package_table .name )
6868 if existing_package then
@@ -101,8 +101,8 @@ local function action_modular_providers(package_table)
101101end
102102
103103--- Gets "package_script_name" from "package_table.script" and runs it.
104- --- @param package_table A valid package table
105- --- @param package_script_name A value that is either " preinstall" , " postinstall" , " preremove" , or " postremove" .
104+ --- @param package_table table A valid package table
105+ --- @param package_script_name string A value that is either " preinstall" , " postinstall" , " preremove" , or " postremove" .
106106local function action_script (package_table , package_script_name )
107107 if package_table .script and package_table .script [package_script_name ] then
108108 local output , scriptError = load (package_table .script [package_script_name ])()
@@ -117,13 +117,13 @@ end
117117local function action_check_hashes (package_table )
118118 if package_table .security and package_table .security .sha256 then
119119 for k , v in pairs (package_table .security .sha256 ) do
120- local digest = sha256 .digest (fs .open (k , " r" ):readAll ())
120+ local digest = sha256 .digest (fs .open (k , " r" ):readAll ()): toHex ()
121121 assert (digest , v )
122122 end
123123 end
124124end
125125--- Creates folders from package_table.dirs
126- --- @param package_table A valid package table
126+ --- @param package_table table A valid package table
127127local function action_make_folders (package_table )
128128 if package_table .dirs then
129129 for _ , v in pairs (package_table .dirs ) do
0 commit comments