elves / elvish

Powerful scripting language & versatile interactive shell
https://elv.sh/
BSD 2-Clause "Simplified" License
5.53k stars 297 forks source link

Failed to execute `bin/format.bat` on windows #1746

Closed da-liii closed 5 months ago

da-liii commented 5 months ago
> bin/format.bat
'bin' is not recognized as an internal or external command,
operable program or batch file.
Exception: bin/format.bat exited with 1
[tty 521]:1:1: bin/format.bat
> bin\format.bat

Have to use bin\xxx.bat on windows, can it support bin/xxx.bat?

Is it a bug or by design?

da-liii commented 5 months ago

Here is the similar issue: https://github.com/elves/elvish/issues/1660

I'm using 0.19.2+official on Windows 11, it seems it has not been fixed.

krader1961 commented 5 months ago

I can't reproduce your problem. Using the Elvish binary from the official download page your example works for me:

elvish> > bin/c.bat

krader@WINDOWS11 C:\Users\krade>echo yes
yes
elvish> cat bin/c.bat
echo yes

The Elvish version I downloaded was 0.20.0-dev.0.20240111000332-82b32d4aceef+official so it is possible the 0.19.2 version you tested does not work as expected.

P.S., The interleaving of the Elvish and "bat" output is arguably wrong. But that is a separate problem.

xiaq commented 5 months ago

Yeah, this was fixed after 0.19.x was branched in https://github.com/elves/elvish/commit/67db2194c8418cfbe7b7c232396ae203c12c8485. Please use a HEAD build.

@krader1961 I'm not sure about what you mean by interleaving - mind clarifying?