Commit f2c19cbe authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask: fix possible race after task new

parent 18b1bc05
......@@ -130,8 +130,8 @@ if [ "$1" = "copy" ] ; then
[ "$1" = "from" ] && FROMSTR="$2"
[ -n "$PACKAGELIST" ] || fatal "no packages"
docmd ssh $GEARHOST task new $TARGET
TASK="$(get_last)"
showcmd ssh $GEARHOST task new $TARGET
TASK="$(ssh $GEARHOST task new $TARGET | head -n1)" || fatal
for PACKAGE in $PACKAGELIST ; do
docmd ssh $GEARHOST task add $TASK copy $PACKAGE $FROMSTR
done
......
Markdown is supported
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