miquella / vaulted

Spawning and storage of secure environments
MIT License
254 stars 30 forks source link

Research ExitWithErrorCode returns in Spawn.go #173

Closed ryan-norton closed 4 years ago

ryan-norton commented 4 years ago

Line 22 in spawn.go

    if err != nil {
        return err
    }

should be revisited to confirm that this should be wrapped in ExitWithErrorCode like the rest of the returns back to the command launch.

miquella commented 4 years ago

I have confirmed that this should not be wrapped in an ExitWithErrorCode. This would mask errors such as vaulted.ErrIncorrectPassword, causing them to no longer be translated into the correct exit codes (see main.go:66).