Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
317 stars 67 forks source link

revup v0.1.3 on windows not working due to subprocess issue #66

Closed AyushSehrawat closed 2 years ago

AyushSehrawat commented 2 years ago

Describe the bug When trying to run the cli on windows ( windows 11 ), it throws the following bug

D:\Projects\Confess>test-env\Scripts\revup -h
Traceback (most recent call last):
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Projects\Confess\test-env\Scripts\revup.exe\__main__.py", line 7, in <module>
  File "d:\projects\confess\test-env\lib\site-packages\revup\__main__.py", line 12, in _main
    sys.exit(asyncio.run(main()))
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "d:\projects\confess\test-env\lib\site-packages\revup\revup.py", line 297, in main
    args = revup_parser.parse_args()
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\argparse.py", line 1768, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\argparse.py", line 1800, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\argparse.py", line 2006, in _parse_known_args
    start_index = consume_optional(start_index)
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\argparse.py", line 1946, in consume_optional
    take_action(action, args, option_string)
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\argparse.py", line 1874, in take_action
    action(self, namespace, argument_values, option_string)
  File "d:\projects\confess\test-env\lib\site-packages\revup\revup.py", line 29, in __call__
    if subprocess.call(man_cmd) != 0:
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Note : This is without activating the venv but the same issue is seen after activation too

After some researching on google i cam across https://stackoverflow.com/questions/73193119/python-filenotfounderror-winerror-2-the-system-cannot-find-the-file-specifie , but this solution also seemed to fail ( it told to make shell=True in subprocess.py file)

If i apply the above stackoverflow solution, revup -h seems to work but the same error comes on revup upload.

I am using: os : windows 11 python : virtual environment ( python -m venv env )

C:\Users\HP>where python
C:\Users\HP\.pyenv\pyenv-win\shims\python
C:\Users\HP\.pyenv\pyenv-win\shims\python.bat
C:\Users\HP>pyenv which python
C:\Users\HP\.pyenv\pyenv-win\versions\3.8.6\python.exe

C:\Users\HP>python -V
Python 3.8.6

revup version : 0.1.3 ( https://pypi.org/project/revup/ )

Expected behavior The CLI should work

To Reproduce 1.) windows os 2) Create a virtual env and activate it 3.) Try installing revup and running there

Logs Mentioned in the bug

jerry-skydio commented 2 years ago

thanks for the report, i think i can fix this in a day or 2

AyushSehrawat commented 2 years ago

thanks for the report, i think i can fix this in a day or 2

Thank you @jerry-skydio ! I look forward to it :)....

jerry-skydio commented 2 years ago

fixed in 0.1.4 https://github.com/Skydio/revup/releases/tag/v0.1.4

jerry-skydio commented 2 years ago

image