Hello Cygwin,

  >I am trying to change directory before run a bash shell with login:

  I've minimized to a minimal example to repro the issue:

  *run_cygwin_bash.bat*:

  ```
  @echo off

  set CYGWIN_ROOT=...
  set PWD=...
  set PROJECT_LOG_FILE=...

  chcp.com 65001 >nul


  "%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:\=/%"""
  ```

  To execute:

  ```
  c:\> start "" cmd.exe /C run_cygwin_bash.bat

  ```

  To stall:

  ```
  $ 123
  c:/cygwin/bin/tee: 'standard output': Permission denied
  ```

  It repro only if:

  `chcp.com 65001` used together with `start "" cmd.exe ...`

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to