The sound distributed version control system

#791 Rust invokes windows specific console API causing crashes in posix-terminals on Windows

Opened by yin on April 14, 2023
yin on April 14, 2023

I used a Windows 10 laptop under Git Bash terminal, which is a MinGW64-based software package.

I tried to create an identity for the first time:

Matej@LAPTOP-T5O8P0A6 MINGW64 ~/Dropbox/Experiments/pijul/manual
$ pijul identity new myself
? Unique identity name (default) › Error: Incorrect function. (os error 1)

It was confusing, I didn’t know where to look for the problem at first.

I tried the same command in CMD and it seems to work OK.

Problem:

Rust is known to have this problem in unknown specific cases (e.g.: https://github.com/mitsuhiko/insta/issues/195). I think this was the first time pijul ever asked me for any input… so maybe setting invisible keys, or waiting for input is what causes the crash. I am not sure I ever used a non minGW64 interactive program inside Git Bash - Windows program just might not work and we can not do anything about it.

Workaround:

We can mention that prepending winpty in front of the command. We could mention it in https://pijul.org/manual/keys.html and/or https://pijul.org/manual/installing.html

yin on April 14, 2023

I should elaborate on why we would like to discuss this topic:

Error messages are always a pain point for users. A bad error message can drive a user away.

Git users are out there, and some use Git-Bash under Windows. These people might be tempted to run Pijul from Git Bash. These users are valuable because they will more likely be Powerusers and benefit the Pijul community in clever ways.