Skip to content

Commit 7b49ad2

Browse files
committed
fix path error messages on windows
1 parent 1894ce7 commit 7b49ad2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/connection/messages.coffee

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,8 @@ module.exports =
7373
"""
7474
We tried to launch Julia from: `#{path}`
7575
This path can be changed in the settings.
76-
""" + if details isnt ''
77-
"""
78-
79-
Details:
80-
81-
#{details}
82-
"""
83-
else
84-
""
76+
"""
77+
detail: details
8578
dismissable: true
8679

8780
connectExternal: ->

lib/connection/process/basic.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import tcp from './tcp'
44
import * as pty from 'node-pty-prebuilt-multiarch'
55
import net from 'net'
66
import { paths, mutex } from '../../misc'
7+
import { jlNotFound } from '../messages'
78

89
export var lock = mutex()
910

@@ -111,6 +112,7 @@ function getProcess (path, args, env) {
111112
reject(err)
112113
})
113114
}).catch((err) => {
115+
jlNotFound(path, err)
114116
reject(err)
115117
})
116118
}).catch((err) => {

lib/misc/paths.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module.exports =
2121
new Promise (resolve, reject) ->
2222
if fs.existsSync(path) then resolve(path)
2323

24+
if process.platform is 'win32'
25+
if /[a-zA-Z]\:/.test(path)
26+
reject("Couldn't resolve path.")
27+
return
28+
2429
which = if process.platform is 'win32' then 'where' else 'which'
2530
proc = child_process.exec "#{which} \"#{path}\"", (err, stdout, stderr) ->
2631
return reject(stderr) if err?

0 commit comments

Comments
 (0)