View Single Post
Old 12-15-2020, 12:07 AM   #403
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,881
Karma: 6120478
Join Date: Nov 2009
Device: many
So for the latest JDK to work there must be no " or ' after the -Duser.dir= or it will barf.

So to get this to work we need to change the plugin.py to the following after the if isosx test:

Code:
    #----------------------------------------------------------------------                                                     
    # define epubcheck command line parameters                                                                                  
    #----------------------------------------------------------------------                                                     

    epc_path = os.path.join(plugin_path, 'epubcheck.jar')
    if is32bit:
	args = [java_path, '-Dfile.encoding=UTF8', '-Xss1024k', '-jar', epc_path, epub_path, '--version']
    else:
        if isosx:
            user_dir_value = '-Duser.dir=' + os.path.join(bk._w.plugin_dir, bk._w.plugin_name, 'temp.epub') + "/"
            args = [java_path, user_dir_value, '-Dfile.encoding=UTF8', '-jar', epc_path, epub_path, '--version']
        else:
            args = [java_path, '-Dfile.encoding=UTF8', '-jar', epc_path, epub_path, '--version']
I have no idea if this version without the quotes will work on older JDK's.

This is strange as under a real shell running in Terminal.app, using quotes around the for the --Duser.dir value works just fine.

So this is some interaction between the shell, and python3.8 subprocess and the very latest jdk's.

But we can just as easily change:

user_dir_value = '-Duser.dir=' + os.path.join(bk._w.plugin_dir, bk._w.plugin_name, 'temp.epub') + "/"

to:

user_dir_value = '-Duser.dir=/tmp'

And that is enough to work around the epubcheck bug.

I wonder if this is bash to zsh change related?

Last edited by KevinH; 12-15-2020 at 12:11 AM.
KevinH is online now   Reply With Quote