1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

powerline-go: fix argument to -error option

Addition of the line "local old_exit_status=$?" broke the call to
powerline-go.

PR #1364
This commit is contained in:
Damien Cassou 2020-06-29 07:18:32 +02:00 committed by Robert Helgesson
parent 58716b7541
commit 7f7348b470
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 2 additions and 2 deletions

View file

@ -110,7 +110,7 @@ in {
programs.bash.initExtra = ''
function _update_ps1() {
local old_exit_status=$?
PS1="$(${pkgs.powerline-go}/bin/powerline-go -error $? ${commandLineArguments})"
PS1="$(${pkgs.powerline-go}/bin/powerline-go -error $old_exit_status ${commandLineArguments})"
${cfg.extraUpdatePS1}
return $old_exit_status
}

View file

@ -22,7 +22,7 @@ with lib;
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'/bin/powerline-go -error $? -modules nix-shell -newline -path-aliases \~/project/foo=prj-foo -ignore-repos /home/me/project1,/home/me/project2'
'/bin/powerline-go -error $old_exit_status -modules nix-shell -newline -path-aliases \~/project/foo=prj-foo -ignore-repos /home/me/project1,/home/me/project2'
'';
};
}