1
1
let
2
- # NOTE: Single quotes in this file break remote execution. So dont use them .
2
+ # NOTE: Single quotes break remote execution. File needs to be shorter than 2000 chars .
3
3
if VERSION > v " 0.7-"
4
4
port = parse (Int, popfirst! (ARGS ))
5
5
else
6
6
port = parse (Int, shift! (ARGS ))
7
7
end
8
8
9
- junorc = haskey (ENV , " JUNORC_PATH" ) ?
10
- joinpath (ENV [" JUNORC_PATH" ], " juno_startup.jl" ) :
11
- joinpath (homedir (), " .julia" , " config" , " juno_startup.jl" )
9
+ junorc = haskey (ENV , " JUNORC_PATH" ) ? joinpath (ENV [" JUNORC_PATH" ], " juno_startup.jl" ) : joinpath (homedir (), " .julia" , " config" , " juno_startup.jl" )
12
10
junorc = abspath (normpath (expanduser (junorc)))
13
11
14
12
if (VERSION > v " 0.7-" ? Base. find_package (" Atom" ) : Base. find_in_path (" Atom" )) == nothing
15
- p = VERSION > v " 0.7-" ? (x) -> printstyled (x, color= :cyan , bold= true ) : (x) -> print_with_color (:cyan , x, bold= true )
13
+ p = VERSION > v " 0.7-" ? x -> printstyled (x, color= :cyan , bold= true ) : x -> print_with_color (:cyan , x, bold= true )
16
14
p (" \n Hold on tight while we are installing some packages for you.\n This should only take a few seconds...\n\n " )
17
15
18
16
if VERSION > v " 0.7-"
@@ -27,10 +25,9 @@ if (VERSION > v"0.7-" ? Base.find_package("Atom") : Base.find_in_path("Atom")) =
27
25
end
28
26
29
27
# TODO : Update me when tagging a new relase:
30
- MIN_REQUIRED_ATOM_JL_VERSION = v " 0.10.2"
31
- atom_outdated = false
28
+ MIN_ATOM_VER = v " 0.10.2"
29
+ outdated = false
32
30
33
- # check package versions:
34
31
try
35
32
if VERSION >= v " 1.0-"
36
33
using Pkg
40
37
tomlpath = joinpath (dirname (atompath), " .." , " Project.toml" )
41
38
atomversion = VersionNumber (Pkg. TOML. parsefile (tomlpath)[" version" ])
42
39
43
- if atomversion < MIN_REQUIRED_ATOM_JL_VERSION
44
- atom_outdated = """
45
- Please upgrade Atom.jl to at least version `$(MIN_REQUIRED_ATOM_JL_VERSION ) ` with e.g. `using Pkg; Pkg.update()`.
40
+ if atomversion < MIN_ATOM_VER
41
+ outdated = """
42
+ Please upgrade Atom.jl to at least version `$(MIN_ATOM_VER ) ` with e.g. `using Pkg; Pkg.update()`.
46
43
47
- If the integrated REPL is non-functional as a consequence of an old version of Atom.jl you will
48
- need to update in a terminal, which you can open with e.g. the `Julia Client: Open A Repl` command.
44
+ If the integrated REPL is non-functional, try an external terminal opened with the `Julia Client: Open External Repl` command.
49
45
"""
50
46
end
51
47
end
@@ -54,7 +50,6 @@ catch err
54
50
@error exception= err
55
51
end
56
52
57
- # load packages and connect to Atom:
58
53
println (" Starting Julia..." )
59
54
60
55
try
66
61
nothing
67
62
end
68
63
Atom. connect (port)
69
- if atom_outdated != false
70
- Atom. msg (" versionwarning" , atom_outdated )
64
+ if outdated != false
65
+ Atom. msg (" versionwarning" , outdated )
71
66
end
72
67
catch
73
- if atom_outdated != false
74
- printstyled (" Outdated version of Atom.jl detected.\n " , atom_outdated , " \n " , color = Base. error_color ())
68
+ if outdated != false
69
+ printstyled (" Outdated version of Atom.jl detected.\n " , outdated , " \n " , color = Base. error_color ())
75
70
end
76
71
rethrow ()
77
72
end
78
-
79
73
end
0 commit comments