View Single Post
Old 12-15-2020, 09:45 AM   #406
Magess
Member
Magess began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2020
Device: web
Quote:
Originally Posted by KevinH View Post
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?
Is this something I as a user can do or something that has to be updated on the developer side?
Magess is offline   Reply With Quote