Hi guys, today when I was doing test after new updates on my software, I got this strange error:
Would you like to install these softwares ?[yes/no]y
<< [1 / 155] Installing @SystemBase-Main:SystemBase (Pass1) /0.2.0/
■ Preparing installation for SystemBase
===============
Internal error
===============
/snap/crystal/2394/share/crystal/src/crystal/system/unix/file.cr:44:9 in 'info?'
/snap/crystal/2394/share/crystal/src/file.cr:198:5 in 'info?'
/snap/crystal/2394/share/crystal/src/file.cr:197:3 in 'info?'
/snap/crystal/2394/share/crystal/src/dir.cr:255:15 in 'exists?'
.ISM.task.cr:42:1 in 'recordInstallationInformation'
.ISM.task.cr:7462:65 in '__crystal_main'
/snap/crystal/2394/share/crystal/src/crystal/main.cr:118:5 in 'main_user_code'
/snap/crystal/2394/share/crystal/src/crystal/main.cr:104:7 in 'main'
/snap/crystal/2394/share/crystal/src/crystal/system/unix/main.cr:9:3 in 'main'
/lib/x86_64-linux-gnu/libc.so.6 in '??'
/lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
/home/ism/snap/crystal/common/.cache/crystal/crystal-run-.ISM.task.tmp in '_start'
???
ISM raised that error because the ran script did not call properly a system command or the system command itself need to be fix.
I inspected the code, and this occur in this function when I try to check Dir.exists.
But why ??? It’s weird no ?
def recordInstallationInformation : Tuple(UInt128, UInt128, UInt128, UInt128)
directoryNumber = UInt128.new(0)
symlinkNumber = UInt128.new(0)
fileNumber = UInt128.new(0)
totalSize = UInt128.new(0)
filesList = Dir.glob(["#{builtSoftwareDirectoryPathNoChroot}/**/*"], match: :dot_files)
filesList.each do |entry|
finalDestination = "/#{entry.sub(builtSoftwareDirectoryPathNoChroot,"")}"
if File.directory?(entry)
if !Dir.exists?(finalDestination)
directoryNumber += 1
end
else
if File.symlink?(entry)
symlinkNumber += 1
else
fileNumber += 1
totalSize += File.size(entry)
end
end
end
return directoryNumber, symlinkNumber, fileNumber, totalSize
rescue error
Ism.printSystemCallErrorNotification(error)
Ism.exitProgram
end