Skip to content

Commit 8570546

Browse files
committed
Fix upgrade command error.
1 parent 4e28ed6 commit 8570546

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dvm.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,11 @@ get_dvm_latest_version() {
492492
}
493493

494494
update_dvm() {
495-
cd "$DVM_DIR" 2>/dev/null || echo "Failed to update dvm." && exit 1
495+
if ! cd "$DVM_DIR" 2>/dev/null
496+
then
497+
echo "Failed to update dvm."
498+
exit 1
499+
fi
496500

497501
# reset changes if exists
498502
git reset --hard HEAD

0 commit comments

Comments
 (0)