homebrew-cask: atom: the command-line `atom` doesn't work properly

When installing atom and invoking it via the command line utility atom ., it seems that it fails to use the apm package manager properly.

pasted_image_10_21_14__3_13_pm

Not sure if this problem should be reported to Atom or to Caskroom, apologies in advance.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 21 (18 by maintainers)

Most upvoted comments

I’m getting a similar error to @ttsda

==> Traceback (most recent call last):
==>   File "/usr/bin/xattr-2.7", line 7, in <module>
==>     from pkg_resources import load_entry_point
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 3138, in <module>
==>     @_call_aside
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 3124, in _call_aside
==>     f(*args, **kwargs)
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set
==>     working_set = WorkingSet._build_master()
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 663, in _build_master
==>     return cls._build_from_requirements(__requires__)
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 676, in _build_from_requirements
==>     dists = ws.resolve(reqs, Environment())
==>   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
==>     raise DistributionNotFound(req, requirers)
==> pkg_resources.DistributionNotFound: The 'xattr==0.6.4' distribution was not found and is required by the application

I managed to fix this by installing xattr using Python’s pip install tool:

pip install xattr

I then edited the /usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/symlinked.rb file in homebrew-cask to use this version of xattr instead:

diff --git a/lib/hbc/artifact/symlinked.rb b/lib/hbc/artifact/symlinked.rb
index 7a29892..b7b044f 100644
--- a/lib/hbc/artifact/symlinked.rb
+++ b/lib/hbc/artifact/symlinked.rb
@@ -31,7 +31,7 @@ class Hbc::Artifact::Symlinked < Hbc::Artifact::Base
     # Some packges are shipped as u=rx (e.g. Bitcoin Core)
     @command.run!('/bin/chmod', :args => ['u=rwx', source])

-    @command.run!('/usr/bin/xattr',
+    @command.run!('/usr/local/bin/xattr',
                   :args => ['-w', attribute, altnames, target],
                   :print_stderr => false)
   end