Skip to content
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.

Already on GitHub? Sign in to your account

conda press --fatten fails on Windows due to rm command not found. #57

Open
SylvainCorlay opened this issue Nov 25, 2019 · 3 comments
Open
Labels
bug Something isn't working

Comments

@SylvainCorlay
Copy link

conda press --fatten fails on Windows due to rm command not found.

Here is the full error message:

xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
xonsh: subprocess mode: command not found: rm
Did you mean one of the following?
    md:  Alias
    rd:  Alias
    cd:  Alias
    fg:  Alias
    bg:  Alias
Traceback (most recent call last):
  File "Miniconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "Miniconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "Miniconda3\lib\site-packages\conda_press\__main__.py", line 3, in <module>
    main()
  File "Miniconda3\lib\site-packages\conda_press\main.xsh", line 77, in main
    run_convert_wheel(ns.files, config)
  File "Miniconda3\lib\site-packages\conda_press\main.xsh", line 87, in run_convert_wheel
    seen, output=config.output, skipped_deps=config.exclude_deps
  File "Miniconda3\lib\site-packages\conda_press\wheel.xsh", line 803, in fatten_from_seen
    rmtree('tmp-wheels')
  File "Miniconda3\lib\site-packages\xonsh\lib\os.xsh", line 33, in rmtree
    ![rm @(cmd_args) @(dirname)]
  File "Miniconda3\lib\site-packages\xonsh\__amalgam__.py", line 22475, in subproc_captured_hiddenobject
    return run_subproc(cmds, captured="hiddenobject")
  File "Miniconda3\lib\site-packages\xonsh\__amalgam__.py", line 22438, in run_subproc
    command.end()
  File "Miniconda3\lib\site-packages\xonsh\__amalgam__.py", line 15680, in end
    self._end(tee_output=tee_output)
  File "Miniconda3\lib\site-packages\xonsh\__amalgam__.py", line 15699, in _end
    self._raise_subproc_error()
  File "Miniconda3\lib\site-packages\xonsh\__amalgam__.py", line 15825, in _raise_subproc_error
    raise subprocess.CalledProcessError(rtn, spec.args, output=self.output)
subprocess.CalledProcessError: Command '['rm', '-r', 'tmp-wheels']' returned non-zero exit status 1.
@SylvainCorlay
Copy link
Author

It appears to be a bug in xonsh:

https://github.com/xonsh/xonsh/blob/92cdb8fbcae11bb1832cd7e1d76ed2338027156c/xonsh/lib/os.xsh#L17

    try:
        ![rm @(cmd_args) @(dirname)]
    except PermissionError:
        if sys.platform == "win32":
            ![del /F/S/Q @(dirname)]
        else:
            raise

it is only falling back to the windows implementation on PermissionError

@marcelotrevisani
Copy link
Member

I think we need to wait for a new release of xonsh then

@marcelotrevisani marcelotrevisani added the bug Something isn't working label Dec 3, 2019
@scopatz
Copy link
Contributor

scopatz commented Dec 3, 2019

Oh yeah, this bug has been fixed and we are waiting for a new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants