Skip to content

Add pty support for Windows? #561

@NathanUrwin

Description

@NathanUrwin

[MAINTAINER EDIT: this ticket is now about possibly adding pty support for Windows so that really-wants-a-pty-to-behave-right applications can work there. See this comment.]


The example source code line can be found here.

Password for 'https://NathanUrwin@github.com':
You indicated pty=True, but your platform doesn't support the 'pty' module!

Implementing this hotfix (setting pty=False) resulted in the following output:

Password for 'https://NathanUrwin@github.com':
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Password for 'https://NathanUrwin@github.com': No error
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Temp\tmpvrxz271b.py", line 384, in <module>
    main()
  File "C:\Users\user\AppData\Local\Temp\tmpvrxz271b.py", line 379, in main
    PostGenProjectHook().run()
  File "C:\Users\user\AppData\Local\Temp\tmpvrxz271b.py", line 371, in run
    self._git_repo()
  File "C:\Users\user\AppData\Local\Temp\tmpvrxz271b.py", line 328, in _git_repo
    self._git_push()
  File "C:\Users\user\AppData\Local\Temp\tmpvrxz271b.py", line 265, in _git_push
    watchers=watchers,
  File "c:\python37\lib\site-packages\invoke\__init__.py", line 49, in run
    return Context().run(command, **kwargs)
  File "c:\python37\lib\site-packages\invoke\context.py", line 94, in run
    return self._run(runner, command, **kwargs)
  File "c:\python37\lib\site-packages\invoke\context.py", line 101, in _run
    return runner.run(command, **kwargs)
  File "c:\python37\lib\site-packages\invoke\runners.py", line 271, in run
    return self._run_body(command, **kwargs)
  File "c:\python37\lib\site-packages\invoke\runners.py", line 404, in _run_body
    raise UnexpectedExit(result)
invoke.exceptions.UnexpectedExit: Encountered a bad command exit code!

Command: 'git push --set-upstream origin master'

Exit code: 128

Stdout: already printed

Stderr: already printed

Thanks in advance for your time! 🙂

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