make kompose exit with 1 if error (#1343)

Old code passes -1 to os.Exit and the value is directly passed to syscall.
The behavior with -1 depends on environments (most cases should convert
into 255 though)

This commit is to remove unnecessary the ambiguity and change it to use 1 instead of 255.
This commit is contained in:
namusyaka
2020-11-04 08:24:52 +08:00
committed by GitHub
parent ee3ae26198
commit 45864ed624
2 changed files with 13 additions and 10 deletions
+9 -2
View File
@@ -16,8 +16,15 @@ limitations under the License.
package main
import "github.com/kubernetes/kompose/cmd"
import (
"log"
"github.com/kubernetes/kompose/cmd"
)
func main() {
cmd.Execute()
if err := cmd.Execute(); err != nil {
log.SetFlags(0)
log.Fatal(err)
}
}