Commit 57053ba7 authored by Xu Wang's avatar Xu Wang
Browse files

suppress the error message from expect to prevent leaking passphrase

parent 9e5b432f
Pipeline #372 skipped
......@@ -34,13 +34,12 @@ function verify_gpg_passphrase() {
}
function do_unlock() {
echo unlock $PWD
keyfile=$1
if [ ! -z $keyfile ];
then
git-crypt unlock $keyfile
else
expect <<EOF
expect 2> /dev/null <<EOF
spawn git-crypt unlock
expect "Enter passphrase:"
send "$passphrase\r";
......@@ -74,10 +73,15 @@ do
skip "Skipping $m; Please update module with: git submodule init $m && git submodule update $m."
continue
else
( echo "Checking out $i master branch"
(
echo
echo
echo "==== Unlocking $m ===="
echo "Checking out $i master branch"
cd $m
git checkout master
do_unlock $keyfile
echo "==== End of $m ===="
)
fi
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment