Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Commit 92789c7

Browse files
committed
Add <none> to help when no override is in place
1 parent 744c8d4 commit 92789c7

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/dnvm.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,22 @@ __dnvm_description() {
261261
printf "%b\n" "${Yel}Current feed settings:${RCol}"
262262
printf "%b\n" "${Cya}Default Stable:${Yel} $_DNVM_DEFAULT_FEED"
263263
printf "%b\n" "${Cya}Default Unstable:${Yel} $_DNVM_DEFAULT_UNSTABLE_FEED"
264-
printf "%b\n" "${Cya}Current Stable Override:${Yel} $DNX_FEED"
265-
printf "%b\n" "${Cya}Current Unstable Override:${Yel} $DNX_UNSTABLE_FEED${RCol}"
264+
265+
local dnxStableOverride="<none>"
266+
[[ -n $DNX_FEED ]] && dnxStableOverride="$DNX_FEED"
267+
268+
printf "%b\n" "${Cya}Current Stable Override:${Yel} $dnxStableOverride"
269+
270+
local dnxUnstableOverride="<none>"
271+
[[ -n $DNX_UNSTABLE_FEED ]] && dnxUnstableOverride="$DNX_UNSTABLE_FEED"
272+
273+
printf "%b\n" "${Cya}Current Unstable Override:${Yel} $dnxUnstableOverride${RCol}"
266274
echo ""
267275

268276
}
269277

270278
__dnvm_help() {
271-
__dnvm_description
279+
UNSTABLE___dnvm_description
272280
printf "%b\n" "${Cya}USAGE:${Yel} $_DNVM_COMMAND_NAME <command> [options] ${RCol}"
273281
echo ""
274282
printf "%b\n" "${Yel}$_DNVM_COMMAND_NAME upgrade [-f|-force] [-u|-unstable] ${RCol}"

0 commit comments

Comments
 (0)