Suppress error when /dev/shm/prompt_msg does not exist
This commit is contained in:
parent
b5958036c4
commit
56c6155640
1 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ space_sh_git_prompt () {
|
|||
}
|
||||
|
||||
prompt_msg () {
|
||||
line=$(tail -1 /dev/shm/prompt_msg)
|
||||
line=$(tail -1 /dev/shm/prompt_msg) 2> /dev/null
|
||||
case $line in
|
||||
update_rc)
|
||||
msg="Update ready for rc. Run uprc to proceed";;
|
||||
|
@ -174,7 +174,7 @@ prompt_msg () {
|
|||
esac
|
||||
|
||||
# Remove last message from stack before it drives us mad
|
||||
sed -i '$ d' /dev/shm/prompt_msg
|
||||
sed -i '$ d' /dev/shm/prompt_msg 2> /dev/null
|
||||
echo $msg
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue