Skip to content

Commit

Permalink
Fix sourcefile_path when loading casks from JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Rylan12 committed Jun 25, 2024
1 parent 5f28f7b commit b7321db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/cask_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ def self.try_new(ref, warn: false)
sig { params(token: String, from_json: Hash, path: T.nilable(Pathname)).void }
def initialize(token, from_json: T.unsafe(nil), path: nil)
@token = token.sub(%r{^homebrew/(?:homebrew-)?cask/}i, "")
@sourcefile_path = path
@path = path || CaskLoader.default_path(@token)
@sourcefile_path = path || CaskLoader.default_path(@token)
@path = @sourcefile_path
@from_json = from_json
end

Expand Down

0 comments on commit b7321db

Please sign in to comment.