# Juliaup does not launch correct binary

**URL:** <https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311>\
**Category:** General Usage\
**Tags:** juliaup\
**Created:** [August 28, 2023, 8:27pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311 "2023-08-28T20:27:56Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 28, 2023, 8:27pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/1 "2023-08-28T20:27:56Z")

</div>

I expect the first command below to launch 1.10.0-beta, but it doesn’t. Can anyone tell me what I am doing wrong?

```bash
> julia +1.10 -v
julia version 1.9.3
> which julia
/usr/local/bin/julia
> ls -l /usr/local/bin/julia
lrwxr-xr-x 1 luke admin 35 Aug 1 14:16 /usr/local/bin/julia@ -> ../Cellar/juliaup/1.11.22/bin/julia
> ls -l /usr/local/Cellar/juliaup/1.11.22/bin/julia
lrwxr-xr-x 1 luke admin 13 Jul 27 09:09 /usr/local/Cellar/juliaup/1.11.22/bin/julia@ -> julialauncher
> julialauncher +1.10 -v
julia version 1.10.0-beta2
> which julialauncher 
/usr/local/bin/julialauncher
> ls -l /usr/local/bin/julialauncher 
lrwxr-xr-x 1 luke admin 43 Aug 1 14:16 /usr/local/bin/julialauncher@ -> ../Cellar/juliaup/1.11.22/bin/julialauncher

```

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 28, 2023, 8:57pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/2 "2023-08-28T20:57:36Z")

</div>

What do you get when you run `juliaup status`?

How did you install things? The thing with the double symbolic links does not look like any of the official ways to do it, right? To me this looks as if, at the end of the day, `julia` doesn’t launch `juliainstaller` on your system, for whatever reason…

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 28, 2023, 9:11pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/3 "2023-08-28T21:11:55Z")

</div>

> What do you get when you run juliaup status?

```bash
> juliaup status
 Default Channel Version Update 
-----------------------------------------------------------------------
          1.10 1.10.0-beta2+0.x64.apple.darwin14                   
          1.9 1.9.3+0.x64.apple.darwin14                          
          dev Linked to `/Users/luke/sources/julia/julia`         
          lts 1.6.7+0.x64.apple.darwin14                          
       * release 1.9.3+0.x64.apple.darwin14

```

This was installed using Homebrew. I think that `julia` is invoking `julialauncher` because:

```bash
> julia -e 'println(joinpath(Sys.BINDIR, Base.julia_exename()))'
/Users/luke/.julia/juliaup/julia-1.9.3+0.x64.apple.darwin14/bin/julia

```

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 28, 2023, 9:19pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/4 "2023-08-28T21:19:28Z")

</div>

Hm, yes, and that is really weird… Can you try

```julia
julia +1.10 -e 'println(joinpath(Sys.BINDIR, Base.julia_exename()))'

```

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 28, 2023, 9:20pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/5 "2023-08-28T21:20:25Z")

</div>

```bash
> julia +1.10 -e 'println(joinpath(Sys.BINDIR, Base.julia_exename()))'
/Users/luke/.julia/juliaup/julia-1.9.3+0.x64.apple.darwin14/bin/julia

```

And as another data point:

```bash
> juliaup default 1.10
Configured the default Julia version to be '1.10'.
> julia -v
julia version 1.10.0-beta2
> julia +release -v
julia version 1.10.0-beta2

```

---

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [August 29, 2023, 5:53am UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/6 "2023-08-29T05:53:22Z")

</div>

You don’t have any alias for julia which adds some default flags or similar?  
If the `+version` is not the first argument I don’t think it works, and would probably give the behavior you see here.

Maybe check what the actual julia process is with `ps aux | grep julia`, for me juliaup will start two processes, one with the `julia +version` and one with `/path/to/julia/version/bin/julia`. Would show that you actually go through the `julialauncher` and fork a new process for the julia version, and you can also see what the full command run was in case of an alias.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 29, 2023, 5:59am UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/7 "2023-08-29T05:59:42Z")

</div>

> [@albheim](#):
>
> If the `+version` is not the first argument I don’t think it works, and would probably give the behavior you see here.

Yes, that is correct, so I guess that could explain it.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [August 29, 2023, 2:06pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/8 "2023-08-29T14:06:53Z")

</div>

What does `type julia` at your prompt show?

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 29, 2023, 4:11pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/9 "2023-08-29T16:11:59Z")

</div>

Thanks for the help. I had defined `alias julia 'julia --color=yes'`, and removing the alias solved the problem.

It is somewhat unfortunate that juliaup is incompatible with aliases. Is there a technical reason that the version specifier must be the first argument?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 29, 2023, 6:58pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/10 "2023-08-29T18:58:11Z")

</div>

Juliaup currently doesn’t understand the semantics of Julia command line arguments, which it would have to if we want to identify where the arguments to Julia end and any arguments to a script that gets launch start. Essentially we would need a way to tell whether a `+1.10` argument is meant for a script that gets launched.

It would be _very_ useful if we added that kind of support to Juliaup, for this case and others. But I can’t think of an easy way to do that, other than completely replicating all the command line options that exist for Julia, which seems tedious…

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [August 30, 2023, 8:47pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/11 "2023-08-30T20:47:53Z")

</div>

Instead of an alias, you can define that as a function:

```julia
julia() { command julia "$@" --color=yes }

```

This way, when you pass `+1.10` or other arguments from the command line, they go in first in the place of `$@`, and the `--color=yes` is always the last argument. So `juliaup` doesn’t get confused by it.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [August 30, 2023, 9:16pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/12 "2023-08-30T21:16:24Z")

</div>

Or, alternatively, you may be able to directly address the reason you need `--color=yes` in the first place. In my experience, I’ve only ever needed it when I’ve had a mismatched/unset `TERM` env var. Doing an `export TERM="xterm-color"` or something like it might be even simpler… and that may even fix colors in other programs, too (or break them entirely, YMMV).

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 30, 2023, 10:08pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/13 "2023-08-30T22:08:01Z")

</div>

Another more long term idea is that we could add some way to configure command line args per channel, or something like that, in Juliaup itself…

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 30, 2023, 11:14pm UTC](https://discourse.julialang.org/t/juliaup-does-not-launch-correct-binary/103311/14 "2023-08-30T23:14:58Z")

</div>

This would be a nice improvement. For example, I will probably want to configure `--banner=short` in 1.11 (and currently on my dev build). But this flag cannot be passed to older versions of Julia.
