8000 Fuck permission denied · Issue #71 · nvbn/thefuck · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fuck permission denied #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

8000

Already on GitHub? Sign in to your account

Closed
cdipaolo opened this issue Apr 21, 2015 · 7 comments
Closed

Fuck permission denied #71

cdipaolo opened this issue Apr 21, 2015 · 7 comments

Comments

@cdipaolo
Copy link

On most recent version (1.1.8) I get this error on OSX 10.10.13 when calling fuck. I assume it has something to do with the $PATH walk on the most recent commit. If this is a permissions error, which it almost certainly is, can it be solved programmatically such that future users don't have to chmod 777 anything to get this CLI to work? Can look in more detail tomorrow, but for now this is all I have.

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 9, in <module>
    load_entry_point('thefuck==1.18', 'console_scripts', 'thefuck')()
  File "/usr/local/lib/python2.7/site-packages/thefuck/main.py", line 136, in main
    matched_rule = get_matched_rule(command, rules, settings)
  File "/usr/local/lib/python2.7/site-packages/thefuck/main.py", line 93, in get_matched_rule
    if rule.match(command, settings):
  File "/usr/local/lib/python2.7/site-packages/thefuck/rules/no_command.py", line 16, in match
    _get_all_bins()))
  File "/usr/local/lib/python2.7/site-packages/thefuck/rules/no_command.py", line 10, in _get_all_bins
    if exe.is_file()]
  File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1202, in is_file
    return S_ISREG(self.stat().st_mode)
  File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1051, in stat
    return self._accessor.stat(self)
  File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 346, in wrapped
    return strfunc(str(pathobj), *args)
OSError: [Errno 13] Permission denied: '/usr/sbin/weakpass_edit'
@nwinkler
Copy link
Contributor

I've got a similar error. My $PATH contains an entry for ./node_modules/bin to include a potential local node_modules/bin folder under the current directory. Since this folder doesn't always exist, fuck fails with the following error:

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 9, in <module>
    load_entry_point('thefuck==1.18', 'console_scripts', 'thefuck')()
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 136, in main
    matched_rule = get_matched_rule(command, rules, settings)
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 93, in get_matched_rule
    if rule.match(command, settings):
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 16, in match
    _get_all_bins()))
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 9, in _get_all_bins
    for exe in Path(path).iterdir()
  File "/Library/Python/2.7/site-packages/pathlib.py", line 982, in iterdir
    for name in self._accessor.listdir(self):
  File "/Library/Python/2.7/site-packages/pathlib.py", line 346, in wrapped
    return strfunc(str(pathobj), *args)
OSError: [Errno 2] No such file or directory: 'node_modules/.bin'

nvbn added a commit that referenced this issue Apr 21, 2015
@nvbn
Copy link
Owner
nvbn commented Apr 21, 2015

Is it repeats in 1.19+?

nvbn added a commit that referenced this issue Apr 21, 2015
@nwinkler
Copy link
Contributor

With 1.20, I'm now getting this error:

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 9, in <module>
    load_entry_point('thefuck==1.20', 'console_scripts', 'thefuck')()
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 136, in main
    matched_rule = get_matched_rule(command, rules, settings)
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 93, in get_matched_rule
    if rule.match(command, settings):
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 23, in match
    _get_all_bins()))
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 16, in _get_all_bins
    for exe in _safe(Path(path).iterdir, [])
  File "/Library/Python/2.7/site-packages/pathlib.py", line 982, in iterdir
    for name in self._accessor.listdir(self):
  File "/Library/Python/2.7/site-packages/pathlib.py", line 346, in wrapped
    return strfunc(str(pathobj), *args)
OSError: [Errno 2] No such file or directory: 'node_modules/.bin'

nvbn added a commit that referenced this issue Apr 21, 2015
@nvbn
Copy link
Owner
nvbn commented Apr 21, 2015

@nwinkler, should work in 1.21+ =)

@nwinkler
Copy link
Contributor

Sorry, no, still the same error:

Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 9, in <module>
    load_entry_point('thefuck==1.21', 'console_scripts', 'thefuck')()
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 136, in main
    matched_rule = get_matched_rule(command, rules, settings)
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/main.py", line 93, in get_matched_rule
    if rule.match(command, settings):
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 23, in match
    _get_all_bins()))
  File "/Users/nils.winkler/workspaces/Nils/thefuck/thefuck/rules/no_command.py", line 16, in _get_all_bins
    for exe in _safe(lambda: Path(path).iterdir(), [])
  File "/Library/Python/2.7/site-packages/pathlib.py", line 982, in iterdir
    for name in self._accessor.listdir(self):
  File "/Library/Python/2.7/site-packages/pathlib.py", line 346, in wrapped
    return strfunc(str(pathobj), *args)
OSError: [Errno 2] No such file or directory: 'node_modules/.bin'

To test this, add ./node_modules/bin to your $PATH variable and try to run fuck in a folder that does not have a node_modules folder.

nvbn added a commit that referenced this issue Apr 21, 2015
@nvbn
Copy link
Owner
nvbn commented Apr 21, 2015

Ok, I've repeated that error locally and in 1.22+ it's definitely fixed =)

@nwinkler
Copy link
Contributor

Yes, it's working fine for me now! Thanks a lot for the hard work on this fuck! (Pun intended)

@nvbn nvbn closed this as completed Apr 21, 2015
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
amtrivedi91 added a commit to amtrivedi91/thefuck that referenced this issue Aug 31, 2016
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0