Project

General

Profile

Actions

Bug #2517

closed

varsym does not return an exit code

Added by Svarov over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
02/23/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi.

Seems that varsym program does not properly return an exit code.
For example, this code won't work:

  1. varsym test=OK
  2. varsym test
    test=OK
  3. varsym TEST
    TEST: No such file or directory
  4. echo $?
    0 # Should be 1
  5. varsym -q TEST || echo Hurrah! #

Regards, Dmitry.

Actions #1

Updated by tuxillo over 11 years ago

  • Status changed from New to Feedback
  • Assignee set to tuxillo

Hi Dmitry,

Should be fixed in 65d793b5df37b8562b7109d685f2dc30023082fd.

antonioh@devel01:/home/antonioh> varsym test=OK
antonioh@devel01:/home/antonioh> varsym test
test=OK
antonioh@devel01:/home/antonioh> echo $?
0
antonioh@devel01:/home/antonioh> varsym TEST
TEST: No such file or directory
antonioh@devel01:/home/antonioh> echo $?
1
antonioh@devel01:/home/antonioh> varsym -d test
antonioh@devel01:/home/antonioh> echo $?
0
antonioh@devel01:/home/antonioh> varsym -d test
test: No such file or directory
antonioh@devel01:/home/antonioh> echo $?
2
antonioh@devel01:/home/antonioh> varsym -s test=OK
test: Operation not permitted
antonioh@devel01:/home/antonioh> echo $?
2
antonioh@devel01:/home/antonioh> varsym -q TEST || echo Hurrah!
Hurrah!

Cheers,
Antonio Huete

Actions #2

Updated by Svarov over 11 years ago

Yes, it works for me now, thanks.

Regards, Dmitry.

Actions #3

Updated by tuxillo over 11 years ago

  • Status changed from Feedback to Closed

Changes MFC'ed also.

Actions

Also available in: Atom PDF