tee: 'standard output': Permission denied
Kevin Schnitzius
kometes@yahoo.com
Wed Dec 30 01:29:04 GMT 2020
On Tuesday, December 29, 2020, 04:47:56 PM EST, Andry via Cygwin <cygwin@cygwin.com> wrote:
> "%CYGWIN_ROOT%\bin\bash.exe" -c "{ cd ""%PWD:\=/%""; CHERE_INVOKING=. ""%CYGWIN_ROOT:\=/%/bin/bash.exe"" -l -i; } 2>&1 | ""%CYGWIN_ROOT:\=/%/bin/tee.exe"" -a ""%PROJECT_LOG_FILE:\=/%"""
```
Cannot repro... Logfile is created correctly and commands and their output are logged there. The file encoding for the logfile is utf-8.
A couple of things though: 1. changing \ to / does not guarantee a valid Cygwin path. 2. the cd does nothing because bash -l starts the shell in the home directory. 3. Once you've started bash, you don't have to supply the full path so "/bin/bash.exe" and "/bin/tee.exe" are fine (assuming your path and mounts are set correctly)
Are any files on a remote share?Are any of the paths relative?Do any of the paths have spaces in them?
You should check out the cygpath utility...
Kevin
More information about the Cygwin
mailing list