-
-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @bradcypert! Looks like a solid PR to me. 😄
I just wonder what's going on with the Linux builds on Travis...
The tests look like they should pass, but for whatever reason, it seems we're getting the wrong version in CI.
Is the mock not working? Does Travis already have Elixir installed? 🤔
Co-Authored-By: bradcypert <brad.cypert@gmail.com>
Co-Authored-By: bradcypert <brad.cypert@gmail.com>
@matchai thanks for looking over my PR and showing me a more idiomatic way to handle the search of a string. I'm not 100% sure why tests would be getting a different version on Linux. As far as I know, the Linux image shouldn't have elixir preinstalled on it and it doesn't look like the travis.yml is adding any elixir stuff. |
set -l elixir_version | ||
|
||
if type -q kiex | ||
set elixir_version $ELIXIR_VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the source of the test failures, because you’ve mocked elixir -v
, but not set a mock value for $ELIXIR_VERSION
or a mock for exenv version-name
. I don’t know the specifics for Travis, but a different CI provider I use has a default version of Elixir installed using kiex
.
|
||
function setup | ||
spacefish_test_setup | ||
mock elixir -v 0 "echo \"Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend stubbing out the value of $ELIXIR_VERSION
here or unsetting it entirely.
@halostatue You were right! I think I just needed to set a value for the Elixir version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see this passing. Looks great!
Thank you for your contribution. 😄
@all-contributors please add @halostatue for reviewing |
I couldn't determine any contributions to add, did you specify any contributions? |
@all-contributors please add @halostatue for review |
I've put up a pull request to add @halostatue! 🎉 |
# [2.6.0](v2.5.0...v2.6.0) (2019-06-19) ### Features * Add elixir section ([#190](#190)) ([9cb48ea](9cb48ea))
🎉 This PR is included in version 2.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR adds in support for Elixir into SpaceFish. This matches parity of the feature in https://github.com/denysdovhan/spaceship-prompt
Description
Adds in a section for Elixir support into SpaceFish. It checks against
iex
,exenv
andelixir
to see if you have an elixir install and only shows in directories that contain mix.ex or other elixir files. It's configureable via the following options:SPACEFISH_ELIXIR_SHOW
true
SPACEFISH_ELIXIR_PREFIX
$SPACEFISH_PROMPT_DEFAULT_PREFIX
SPACEFISH_ELIXIR_SUFFIX
$SPACEFISH_PROMPT_DEFAULT_SUFFIX
SPACEFISH_ELIXIR_SYMBOL
💧·
SPACEFISH_ELIXIR_COLOR
magenta
Motivation and Context
This helps maintain the mission of absolute parity with Spaceship.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
This was tested by writing and running unit tests for my code. I wasn't able to find the build instructions, so I'm unsure how to actually build and test this locally, however.
Checklist: