Changeset 6 in code for trunk/zs.go


Ignore:
Timestamp:
Dec 5, 2014, 6:21:42 PM (11 years ago)
Author:
zaitsev.serge
Message:

added tests for eval command runner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zs.go

    r5 r6  
    111111        err := run(path.Join(ZSDIR, cmd[0]), cmd[1:], vars, outbuf)
    112112        if err != nil {
    113                 log.Println(err)
     113                if _, ok := err.(*exec.ExitError); ok {
     114                        return "", err
     115                }
    114116                outbuf = bytes.NewBuffer(nil)
    115117                err := run(cmd[0], cmd[1:], vars, outbuf)
    116                 if err != nil {
     118                // Return exit errors, but ignore if the command was not found
     119                if _, ok := err.(*exec.ExitError); ok {
    117120                        return "", err
    118121                }
Note: See TracChangeset for help on using the changeset viewer.