Bug#922914: If cannot change default, then at least return an error
    積丹尼 Dan Jacobson 
    jidanni at jidanni.org
       
    Thu Feb 21 20:14:21 GMT 2019
    
    
  
Package: xdg-utils
Version: 1.1.3-1
File: /usr/bin/xdg-mime
$ xdg-mime default zzzz.desktop text/html; echo $?
0
$ xdg-mime query default text/html
org.gnome.Epiphany.desktop
Or make a sixth exit code to say what happened in this case.
EXIT CODES
       An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
       1
           Error in command line syntax.
       2
           One of the files passed on the command line did not exist.
       3
           A required tool could not be found.
       4
           The action failed.
       5
           No permission to read one of the files passed on the command line.
    
    
More information about the Pkg-freedesktop-maintainers
mailing list