diff --git a/builtin_set.c b/builtin_set.c index 0ef50d0ec..2bf1ef3ac 100644 --- a/builtin_set.c +++ b/builtin_set.c @@ -621,10 +621,55 @@ static int builtin_set( wchar_t **argv ) int i; for( i=woptind; i al_get_count( &result ) ) + { + retcode++; + } + } + } + else + { + if( !env_exist( arg, scope ) ) + { + retcode++; + } + } + + free( dest ); } return retcode;