Bring $JAVA_CMD inline
This commit is contained in:
parent
8ad87d4fba
commit
4c60151330
@ -247,10 +247,6 @@ augroup END
|
|||||||
" }}}1
|
" }}}1
|
||||||
" Java runner {{{1
|
" Java runner {{{1
|
||||||
|
|
||||||
if !exists('g:java_cmd')
|
|
||||||
let g:java_cmd = exists('$JAVA_CMD') ? $JAVA_CMD : 'java'
|
|
||||||
endif
|
|
||||||
|
|
||||||
let s:oneoff = {}
|
let s:oneoff = {}
|
||||||
|
|
||||||
function! s:oneoff.path() dict abort
|
function! s:oneoff.path() dict abort
|
||||||
@ -281,7 +277,8 @@ function! s:oneoff.eval(expr, options) dict abort
|
|||||||
call writefile(split('(do '.a:expr.')', "\n"), s:oneoff_in, 'b')
|
call writefile(split('(do '.a:expr.')', "\n"), s:oneoff_in, 'b')
|
||||||
call writefile([], s:oneoff_out, 'b')
|
call writefile([], s:oneoff_out, 'b')
|
||||||
call writefile([], s:oneoff_err, 'b')
|
call writefile([], s:oneoff_err, 'b')
|
||||||
let command = g:java_cmd.' -cp '.shellescape(self.classpath).' clojure.main -e ' .
|
let java_cmd = exists('$JAVA_CMD') ? $JAVA_CMD : 'java'
|
||||||
|
let command = java_cmd.' -cp '.shellescape(self.classpath).' clojure.main -e ' .
|
||||||
\ shellescape(
|
\ shellescape(
|
||||||
\ '(binding [*out* (java.io.FileWriter. '.s:str(s:oneoff_out).')' .
|
\ '(binding [*out* (java.io.FileWriter. '.s:str(s:oneoff_out).')' .
|
||||||
\ ' *err* (java.io.FileWriter. '.s:str(s:oneoff_err).')]' .
|
\ ' *err* (java.io.FileWriter. '.s:str(s:oneoff_err).')]' .
|
||||||
|
Loading…
Reference in New Issue
Block a user