Bug 409133 - --export exits with non-zero status on success
Summary: --export exits with non-zero status on success
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-24 14:20 UTC by Andrei Alexeyev
Modified: 2019-07-08 14:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Alexeyev 2019-06-24 14:20:52 UTC
SUMMARY
Since 4.2 `krita --export` exits with status 1 even though the export succeeds, indicating failure. This breaks some automation scripts that (correctly) consider a non-zero exit status to indicate an error.


STEPS TO REPRODUCE
1. Create and save a Krita document `test.kra` (or pick an existing one)
2. In a terminal run: `krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'`
3. Check test.png and ensure that the export, in fact, was successful.

OBSERVED RESULT

    $ krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'
    Set style "fusion"
    Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc" "Crayon Colors"
    Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc" "X11 Colors"
    krita.general: Warning: some tiles have leaked:
    krita.general:  Tiles in memory: 258 
            Total tiles: 258
    failure!


EXPECTED RESULT

    $ krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'
    success!

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 1 Halla Rempt 2019-06-24 14:44:24 UTC
Git commit 9d6097e2d7648fa586ea28be59c0aced2485af84 by Boudewijn Rempt.
Committed on 24/06/2019 at 14:44.
Pushed by rempt into branch 'master'.

Return booleans, not ints, so the --export option returns 0 on success

M  +6    -6    libs/ui/KisApplication.cpp

https://invent.kde.org/kde/krita/commit/9d6097e2d7648fa586ea28be59c0aced2485af84
Comment 2 Halla Rempt 2019-07-08 14:59:29 UTC
Git commit 439805df9315cc89b164ea60ce55dee7af5cffb8 by Boudewijn Rempt.
Committed on 08/07/2019 at 14:59.
Pushed by rempt into branch 'krita/4.2'.

Return booleans, not ints, so the --export option returns 0 on success

M  +6    -6    libs/ui/KisApplication.cpp

https://invent.kde.org/kde/krita/commit/439805df9315cc89b164ea60ce55dee7af5cffb8