Skip to content

Undefined method `exists?' for class File and/or Dir #47

Description

@WCarlW

When I use homebrew to install redis-stack, I receive the following errors:

Purging files for version 7.2.0-v10 of Cask redis-stack-server
Error: undefined method exists?' for class Dir /opt/homebrew/Library/Taps/redis-stack/homebrew-redis-stack/Casks/redis-stack-server.rb:59:in block (2 levels) in load'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in instance_eval' /opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in abstract_phase'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:26:in install_phase' /opt/homebrew/Library/Homebrew/cask/installer.rb:248:in block in install_artifacts'
/opt/homebrew/Library/Homebrew/cask/artifact_set.rb:10:in each' /opt/homebrew/Library/Homebrew/cask/artifact_set.rb:10:in each'
/opt/homebrew/Library/Homebrew/cask/installer.rb:241:in install_artifacts' /opt/homebrew/Library/Homebrew/cask/installer.rb:113:in install'
/opt/homebrew/Library/Homebrew/cask/installer.rb:360:in block in satisfy_cask_and_formula_dependencies' /opt/homebrew/Library/Homebrew/cask/installer.rb:346:in each'
/opt/homebrew/Library/Homebrew/cask/installer.rb:346:in satisfy_cask_and_formula_dependencies' /opt/homebrew/Library/Homebrew/cask/installer.rb:71:in fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:102:in install' /opt/homebrew/Library/Homebrew/cmd/install.rb:246:in block in run'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in each' /opt/homebrew/Library/Homebrew/cmd/install.rb:235:in run'
/opt/homebrew/Library/Homebrew/brew.rb:92:in `

'

and

Purging files for version 7.2.0-v10 of Cask redis-stack-server
Error: undefined method exists?' for class File /opt/homebrew/Library/Taps/redis-stack/homebrew-redis-stack/Casks/redis-stack-server.rb:65:in block (2 levels) in load'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in instance_eval' /opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in abstract_phase'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:26:in install_phase' /opt/homebrew/Library/Homebrew/cask/installer.rb:248:in block in install_artifacts'
/opt/homebrew/Library/Homebrew/cask/artifact_set.rb:10:in each' /opt/homebrew/Library/Homebrew/cask/artifact_set.rb:10:in each'
/opt/homebrew/Library/Homebrew/cask/installer.rb:241:in install_artifacts' /opt/homebrew/Library/Homebrew/cask/installer.rb:113:in install'
/opt/homebrew/Library/Homebrew/cask/installer.rb:360:in block in satisfy_cask_and_formula_dependencies' /opt/homebrew/Library/Homebrew/cask/installer.rb:346:in each'
/opt/homebrew/Library/Homebrew/cask/installer.rb:346:in satisfy_cask_and_formula_dependencies' /opt/homebrew/Library/Homebrew/cask/installer.rb:71:in fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:102:in install' /opt/homebrew/Library/Homebrew/cmd/install.rb:246:in block in run'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in each' /opt/homebrew/Library/Homebrew/cmd/install.rb:235:in run'
/opt/homebrew/Library/Homebrew/brew.rb:92:in `

'

According to the answer from stackoverflow, the exists should be changed to exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions