switched 'type' to 'which' in dependency check for sudo