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 = '' programs.bash.initExtra = ''
function _update_ps1() { function _update_ps1() {
local old_exit_status=$? 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} ${cfg.extraUpdatePS1}
return $old_exit_status return $old_exit_status
} }

View file

@ -22,7 +22,7 @@ with lib;
assertFileExists home-files/.bashrc assertFileExists home-files/.bashrc
assertFileContains \ assertFileContains \
home-files/.bashrc \ 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'
''; '';
}; };
} }