Skip to content

Commit

Permalink
Merge pull request thewtex#47 from NHDaly/tmux-error-messages
Browse files Browse the repository at this point in the history
Added error message printing to the tmux plugin.
  • Loading branch information
thewtex authored Sep 28, 2016
2 parents 35fea56 + 5c37494 commit 0e227c1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tmux-mem-cpu-load.plugin.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

pushd $CURRENT_DIR #Pushd to the directory where this plugin is located.
cmake .
make

# Attempt to rebuild the plugin and log any errors in the tmux display window.
output=$(cmake . 2>&1) || tmux run-shell "echo \"'cmake $CURRENT_DIR' failed.
$output
\"" && exit 1

output=$(make 2>&1) || tmux run-shell "echo \"tmux-mem-cpu-load failed to build.
$output
\"" && exit 1

popd

0 comments on commit 0e227c1

Please sign in to comment.