Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for .zshrc in ZDOTDIR if defined #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eikaas
Copy link

@eikaas eikaas commented Oct 18, 2018

Mimics the default behavior of zsh

@codecov
Copy link

codecov bot commented Oct 18, 2018

Codecov Report

Merging #71 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #71   +/-   ##
======================================
  Coverage    90.2%   90.2%           
======================================
  Files          14      14           
  Lines         858     858           
======================================
  Hits          774     774           
  Misses         75      75           
  Partials        9       9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d98d7e...da48f50. Read the comment docs.

func zshrcPath() string {
if zDotDir := os.Getenv("ZDOTDIR"); zDotDir != "" {
f := filepath.Join(zDotDir, ".zshrc")
if info, err := os.Stat(f); err != nil || !info.IsDir() {
Copy link
Owner

Choose a reason for hiding this comment

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

err == nil && !info.IsDir()?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this is completely wrong. Updated it

cmd/install/install.go Show resolved Hide resolved
Copy link
Owner

@posener posener left a comment

Choose a reason for hiding this comment

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

Hi,
Thanks for this change.
Did you check it with this sort of folder?
Thanks

@posener posener changed the title Look for .zshrc in ZDOTDIR if its defined Look for .zshrc in ZDOTDIR if defined Oct 19, 2018
@posener
Copy link
Owner

posener commented Feb 8, 2019

@eikaas since we don't have any tests here, I will only merge it if you tested the change manually.

@brandondrew
Copy link

Any chance of getting this conflict resolved and the fix merged?

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

Successfully merging this pull request may close these issues.

3 participants