Skip to content

Building nightly #25

Open
Open
@SpieringsAE

Description

@SpieringsAE

I'm working on the nightly setting (also target selection this is working properly).
But there is an issue. In the cargo_command() function
https://github.com/slint-ui/cargo-ui/blob/dbf4777f198a5e12382bb23aca1a82bcc5d3b97a/src/cargo.rs#L471C1-L474C2
The env variable CARGO is used to get the instance of cargo to put at the front of the commando.
However this links to (on linux) /home/user/.rustup/toolchains/(stable-toolchain)/bin/cargo
This will give an error:

error: no such command: `+nightly`

        Cargo does not handle `+toolchain` directives.
        Did you mean to invoke `cargo` through `rustup` instead?

While the actual cargo (on linux) /home/user/.cargo/bin/cargo does work

Is there a way to circumvent this?
I see 2 options:

  1. replace stable- with nightly- in the function when a nightly build is made
  2. just use cargo and not the CARGO env variable, however this will not work for someone who doesn´t have cargo on their path, but who doesn't really?.

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