Newer
Older
dub_jkp / test / 0-init-fail-json.sh
@Martin Nowak Martin Nowak on 3 Jul 2017 361 bytes unify flags and error handling
#!/usr/bin/env bash

. $(dirname "${BASH_SOURCE[0]}")/common.sh
packname="0-init-fail-pack"
deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist...

$DUB init -n $packname $deps -f json

function cleanup {
    rm -rf $packname
}

if [ -e $packname/dub.json ]; then # package is there, it should have failed
    cleanup
    exit 1
fi
exit 0