Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Forth trial #16
Browse files Browse the repository at this point in the history
  • Loading branch information
TeroFrondelius committed Feb 15, 2017
1 parent 191619b commit fc5a43f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/linter-julia.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ module.exports =
activate: ->
tempfil = tmp.tmpNameSync({ prefix:'lintserver',postfix: 'sock'})
if process.platform == 'win32'
tmpstr = '\\\\.\\pipe\\' + tempfil.split("\\").pop()
global.named_pipe = tmpstr.replace(/\\/g,"\\\\")
global.named_pipe = '\\\\.\\pipe\\' + tempfil.split("\\").pop()
pipetospawn = named_pipe.replace(/\\/g,"\\\\")
jcode = "using Lint; lintserver(\"#{pipetospawn}\")"
else
global.named_pipe = tempfil
jcode = "using Lint; lintserver(\"#{named_pipe}\")"
jcode = "using Lint; lintserver(\"#{named_pipe}\")"
console.log jcode
jserver = spawn atom.config.get('linter-julia.julia'), ['-e', jcode]
jserver.stdout.on 'data', (data) -> console.log data.toString().trim()
jserver.stderr.on 'data', (data) -> console.log data.toString().trim()

deactivate: ->
# Removes the socket when shutting down
fs.unlinkSync(named_pipe)
if process.platform != 'win32'
fs.unlinkSync(named_pipe)

provideLinter: ->
provider =
Expand Down

0 comments on commit fc5a43f

Please sign in to comment.