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

main.getValidCwd() breaks on cygwin #123

Closed
kylewolfe opened this issue Mar 14, 2019 · 2 comments
Closed

main.getValidCwd() breaks on cygwin #123

kylewolfe opened this issue Mar 14, 2019 · 2 comments
Labels

Comments

@kylewolfe
Copy link

kylewolfe commented Mar 14, 2019

https://github.com/justjanne/powerline-go/blob/master/main.go#L95-L101

I receive this warning in almost every directory except ~: [powerline-go]Your current directory is invalid. Lowest valid directory:

I suggest the following possible fixes:

  • Option to disable valid directory checking (is this overhead even needed?)
  • Check if $OSTYPE == cygwin
    • Route through cygpath -m $pwd
    • Turn off valid directory check
  • Provide a global CLI option for the user to provide the cwd or pwd that will work. Eg: PS1="$($GOPATH/bin/powerline-go -modules="host,user,git,kube,cwd" -pwd $(cygpath -m `pwd`) -error $?)"

I think the last option seems the cleanest, least invasive, and quickest to implement.

Related to #12.

kylewolfe pushed a commit to kylewolfe/powerline-go that referenced this issue Mar 14, 2019
@kylewolfe
Copy link
Author

PR #124 has been submitted.

@justjanne justjanne added the bug label Dec 12, 2019
@justjanne
Copy link
Owner

Could you try this with the changed implementation now again?

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

No branches or pull requests

2 participants