Skip to content
Snippets Groups Projects

Correct handling of missing .bash_history

Merged Martyn Welch requested to merge (removed):T4802 into master
1 unresolved thread
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
+ 3
2
@@ -60,8 +60,9 @@ TEST_TITLE=$( basename ${EXPECT_FILE} )
# Touch .bash_history, which we use in some tests, if it's not there.
bash_history="/home/${CHAIWALA_USER}/.bash_history"
if [ ! -r ${bash_history} ]; then
RET=$( sudo -u ${CHAIWALA_USER} touch ${bash_history} )
if [ $RET != 0 ]; then
sudo -u ${CHAIWALA_USER} touch ${bash_history}
RET=$?
if [ "$RET" != "0" ]; then
Please register or sign in to reply
echo "Failed to create .bash_history: $RET"
exit 1
fi
Loading