Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Enhance shell detection in env command #2610

Merged
merged 2 commits into from
Dec 18, 2015

Conversation

jeanlaurent
Copy link
Member

This fix :

  • un-hide the message displayed to the user on windows stating to use the --shell flag
  • On windows, default to cmd if we detect we are not running in cywin/mingw etc...
  • Properly detect fish shell
  • Unit test for everyone.

This fixes #1441, #732

Signed-off-by: Jean-Laurent de Morlhon <[email protected]>
@jeanlaurent
Copy link
Member Author

Ready for review cc @docker/machine-maintainers

originalShell := os.Getenv("SHELL")
os.Setenv("SHELL", "")
defer os.Setenv("SHELL", originalShell)
shell, _ := detectShell()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check the error please (even just to make sure it is nil)? 😉

@nathanleclaire
Copy link
Contributor

Please check the errors in the tests and then LGTM

@dgageot
Copy link
Member

dgageot commented Dec 18, 2015

LGTM when the tests are fixed

@jeanlaurent jeanlaurent force-pushed the detect-shell branch 2 times, most recently from 66ad93d to 7072616 Compare December 18, 2015 10:40
Signed-off-by: Jean-Laurent de Morlhon <[email protected]>
@jeanlaurent
Copy link
Member Author

Integrated the tests check

jeanlaurent added a commit that referenced this pull request Dec 18, 2015
Enhance shell detection in `env` command
@jeanlaurent jeanlaurent merged commit fbf97b7 into docker:master Dec 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker-machine on Windows / msysgit bash cannot generate env keys (v1.3)
4 participants