projects/sievemgr

diff cmd/sievemgr/put.go @ 3:3cd182bff992

Show warning messages in put output
author Guido Berhoerster <guido+sievemgr@berhoerster.name>
date Tue Oct 27 17:54:58 2020 +0100 (10 months ago)
parents 0cd5a454dfb4
children f925f15d8ce5
line diff
     1.1 --- a/cmd/sievemgr/put.go	Mon Oct 26 14:46:39 2020 +0100
     1.2 +++ b/cmd/sievemgr/put.go	Tue Oct 27 17:54:58 2020 +0100
     1.3 @@ -85,8 +85,10 @@
     1.4  	}
     1.5  	defer c.Logout()
     1.6  
     1.7 -	if err := c.PutScript(scriptName, script); err != nil {
     1.8 +	if warnings, err := c.PutScript(scriptName, script); err != nil {
     1.9  		return err
    1.10 +	} else if warnings != "" {
    1.11 +		fmt.Fprintln(os.Stderr, warnings)
    1.12  	}
    1.13  
    1.14  	return nil