Skip to content

elixir-format fails with asdf version manager ? #431

@jeanparpaillon

Description

@jeanparpaillon

Hi,
I'm using emacs 26.1 with elixir-mode (20190319.1844, from ELPA).
My elixir env versioning is managed with asdf (https://github.com/asdf-vm/asdf).

asdf uses shell 'shims' to wrap right version version.

When running elixir-format without asdf (PATH does not include asdf shims), everything's fine.
When running elixir-format with asdf wrappers, I have the following error:

** (SyntaxError) /home/jean/.asdf/shims/mix:4: syntax error before: '.'
    (elixir) lib/code.ex:767: Code.require_file/2

When running the command executed by emacs in the terminal, it's fine too:

~/.asdf/shims/mix format --dot-formatter /path/to/formatter.exs file-to-format.exs

The asdf shim:

#!/usr/bin/env bash
# asdf-plugin: elixir 1.7.4
# asdf-plugin: elixir 1.8.1
exec /home/jean/.asdf/bin/asdf exec "mix" "$@"

Any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions