Skip to content

Commit

Permalink
Patched few implementation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgurance committed Jul 8, 2024
1 parent a0818f7 commit 22c04b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ISM/CommandLine.cr
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,13 @@ module ISM
def addInstalledSoftware(softwareInformation : ISM::SoftwareInformation, installedFiles = Array(String).new)
softwareInformation.installedFiles = installedFiles

softwareInformation.writeInformationFile(softwareInformation.installedFilePath)
softwareInformation.writeConfiguration(softwareInformation.installedFilePath)
end

def addSoftwareToFavouriteGroup(fullVersionName : String, favouriteGroupName = ISM::Default::FavouriteGroup::Name)
path = ISM::FavouriteGroup.filePath(favouriteGroupName)

favouriteGroup = ISM::FavouriteGroup.loadConfiguration(path)
favouriteGroup.loadConfiguration
favouriteGroup.softwares = favouriteGroup.softwares | [fullVersionName]
favouriteGroup.writeConfiguration
end
Expand All @@ -305,7 +304,6 @@ module ISM

if File.exists?(path)
favouriteGroup = ISM::FavouriteGroup.loadConfiguration(path)
favouriteGroup.loadConfiguration
favouriteGroup.softwares.delete(fullVersionName)
favouriteGroup.writeConfiguration
end
Expand Down Expand Up @@ -374,7 +372,7 @@ module ISM
installedOne = ISM::SoftwareInformation.new

if File.exists?(software.installedFilePath)
installedOne.loadConfiguration(software.installedFilePath)
installedOne = ISM::SoftwareInformation.loadConfiguration(software.installedFilePath)
end

alreadyInstalled = installedOne.isValid
Expand Down Expand Up @@ -927,7 +925,7 @@ module ISM
realLineNumber = taskError.line-targetStartingLine
targetPath = line[line.index("/")..-1]

software.loadConfiguration(targetPath)
software = ISM::SoftwareInformation.loadConfiguration(targetPath)
break
end

Expand Down

0 comments on commit 22c04b3

Please sign in to comment.