
+ if @hash["#{program}_version"]?
how about check if @hash has key "#{program}_version"?
Check the value maybe more accurate, because if value nill, the program_version is nill, this will call error. Thanks Zahngyu
+ program_version = @hash["#{program}_version"] + else + program_version = "latest" + end + deps_dest_file = "#{SRV_INITRD}/deps/#{mount_type}/#{os_dir}/#{program}/#{program}.cgz" - pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}/latest.cgz" + pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}/#{program_version}.cgz"
if File.exists?(deps_dest_file) initrd_deps_arr << "#{initrd_http_prefix}" + JobHelper.service_path(deps_dest_file) -- 2.23.0