Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Terminal does not open in project folder #178

Closed
ghost opened this issue Feb 26, 2017 · 12 comments
Closed

Terminal does not open in project folder #178

ghost opened this issue Feb 26, 2017 · 12 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2017

I am on Windows 10, Atom 1.14.3. The terminal opens at it's default root, not the project. I have tried powershell and cygwin. To be fair this is also happening on terminal-plus, but in terminal-plus the terminal is not even loading. It sounds like terminal-plus is broken on Win 10.

@Vasencheg
Copy link

The terminal opens at root folder. I am on Win 10 and msys2 bash.

@filviu
Copy link

filviu commented Feb 28, 2017

Is there any environment variable that can be specified as a command line parameter to bash?

@Vasencheg
Copy link

I fix the issue by adding 'process.platform isnt 'win32'' in the lib/process.coffee file:

if /zsh|bash/.test(shell) and args.indexOf('--login') == -1 and process.platform isnt 'win32' args.unshift '--login'

The '--login' parameter is the source of the issue on Windows.

@ghost
Copy link
Author

ghost commented Mar 2, 2017

Windows Powershell now opens at the project folder, but Cygwin still opens at the root folder.

@Vasencheg
Copy link

Have you got any shell arguments in the "platformio-ide-terminal" settings?

@ghost
Copy link
Author

ghost commented Mar 2, 2017

No

@Vasencheg
Copy link

Vasencheg commented Mar 3, 2017

It's very strange.
Do you launch "CYGWIN_FOLDER\bin\bash.exe" instead of using 'cygwin.bat' from root folder.

@ghost
Copy link
Author

ghost commented Mar 3, 2017 via email

@Vasencheg
Copy link

I mean 'C:\cygwin\Cygwin.bat'.
I have tried '/bin/bash.exe' and it works for me. I use msys2 a long time.
Maybe try msys2 instead of Cygwin, but perhaps the problem is deeper.

@Vasencheg
Copy link

Try this workaround. Put this lines of code in the lib/process.coffee file:

index = args.indexOf('--login')
if  index != -1 and process.platform is 'win32'
   args.splice(index, 1)

https://gist.github.com/Vasencheg/0cc91bb12394f62e548d3292a86cc2ce

@ghost
Copy link
Author

ghost commented Mar 3, 2017 via email

@Vasencheg
Copy link

Maybe. I have tried Cygwin and Msys2 'bin/bash.exe' and it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants