You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
I'm on 64bit Windows 7 with cygwin32, Git Bash, and Hyper 1.4.8. The statusline shows nothing until I run a command like git status with unstaged changes, then it shows the first path in the output as my cwd with no Git info.
I actually found a workaround for this, by replacing the logic for win32 in setCwd with the following
if (process.platform == 'win32') {
// lsof isn't present, but /proc/${pid}/cwd is
exec(`readlink -e /proc/${pid}/cwd`, (err, stdout) => {
// Convert Cygwin path to Windows path for Git Bash
exec(`cygpath -w ${stdout}`, (err, stdout) => {
cwd = stdout.trim();
setGit(cwd);
})
});
}
While this works for cygwin with Git Bash installed separately, I'm not sure if this works for Cygwin using Cygwin's Git, or if it would work for Git Bash/MinGW. I'm also not sure how you could detect Cygwin or other setups from the plugin.
The text was updated successfully, but these errors were encountered:
An option is to have fallback, which triggers if previous method does not return correct path.
For example, default is as is now and if that fails your code gets executed.
If the last command prints a path name (git status), then the existing code thinks that path is the cwd and the fallback won't run. Otherwise that would work.
On top of that, cygpath needs to be run if using Git for Windows, but not if Git was installed through Cygwin 😩 You can at least tell if it's Git for Windows by checking if git --version contains "windows" (git version 2.16.1.windows.1)
I can try to get a PR together that checks these conditions, the code in my original post is too specific to my setup.
This works only problem is that when I cd out of the repository the statusline still shows the same branch with the all the git numbers from the previous repo, even if you cd into another repo,
This works if you directly open hyper from the respective repo, Is there anyone who has solved this.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm on 64bit Windows 7 with cygwin32, Git Bash, and Hyper 1.4.8. The statusline shows nothing until I run a command like
git status
with unstaged changes, then it shows the first path in the output as my cwd with no Git info.I actually found a workaround for this, by replacing the logic for win32 in
setCwd
with the followingWhile this works for cygwin with Git Bash installed separately, I'm not sure if this works for Cygwin using Cygwin's Git, or if it would work for Git Bash/MinGW. I'm also not sure how you could detect Cygwin or other setups from the plugin.
The text was updated successfully, but these errors were encountered: