237dmitry

Results 330 comments of 237dmitry
trafficstars

Is there logical OR instead of logical AND? | logical operator | file exists | newer | older | result | |----- |--------|---------|------------|-----| | and | true | true |...

![func](https://github.com/PowerShell/PowerShell/assets/78153320/32bfe8f1-425d-4b03-8954-67fe55db699b)

I tried your script only on Linux. It works if repr.py has python shebang and bit for execution. ``` #!/usr/bin/env python import sys print(repr(sys.stdin.buffer.read()).lstrip('b')) ``` ```powershell $ gi ./repr.py Directory:...

I can’t try on Windows, there is no python and no wsl. There are also no Unix utilities. Could you give another example, without python, only with native Windows utilities?

With `Start-Process` it works as expected. Especially unzipped 7.4.0-preview.4 ``` cmd /c echo hi | Start-Process .\Desktop\hello.vbs -ea 0 ``` ![Screenshot 2023-07-01 161128](https://github.com/PowerShell/PowerShell/assets/78153320/e7fa9004-1674-460c-95c7-c97a6d466adf) I think the issue is really exists....

> non-zero exit code: -1978335212 This is the strange `$LASTEXITCODE` (on linux): ```powershell PS > bash -c "exit -1978335212" PS > $LASTEXITCODE 20 ```

> The ExitCode in the exception is an int, hence 32 bit signed integer. Yes. This is integer but not correct value: ```powershell PS > bash -c "exit 100000" PS...

> again, the value is AND-ed with 0xFF: Then why (bash): ``` $ bash -c "exit 1000000" $ echo -e $? 64 ```

> because 1000000 is 0x000F4240 and 0x40 is 64 Okay, everything topsy-turvy. Like `UnixStat`.

> It would be nice if PS would know/remember how it was installed How to detect installation method? One person build from source, one more unpack from archive, the third...