luan / vimfiles

The Vim Configuration. Uses vim-plug to manage plugins.
172 stars 58 forks source link

ensure install returns success when go not installed #135

Closed tom025 closed 5 years ago

tom025 commented 5 years ago

Any bash function will implicitly return the value of the last evaluated expression.

From the bash documentation

When executed, the exit status of a function is the exit status of the last command executed in the body.

When go is not installed the expression has_go && setup_go_dependencies will return non zero, as it is the last expression of main it also returns non zero. This in turn causes the script to return non zero. This gives the appearance the script has failed even though it succeeded.

The simple solution is to call return 0 at the bottom of the main function.

beatrichartz commented 5 years ago

Getting hit by this as well - anything preventing this from being merged?

(Also, oh hi @tom025 who got me to use this awesome config in the first place!)