Skip to content

Add global install option for cargo and add env vars for binaries and directories#223

Open
jackh726 wants to merge 1 commit into
mainfrom
global-install
Open

Add global install option for cargo and add env vars for binaries and directories#223
jackh726 wants to merge 1 commit into
mainfrom
global-install

Conversation

@jackh726
Copy link
Copy Markdown
Contributor

What does this PR do?

Two main things here:

  • Add a global option to installs of source = "cargo", where we don't use --root and instead install into the user's PATH
  • Add SYMPOSIUM_<name> and SYMPOSIUM_DIR_<name> environment variables for the executable (or script) and the install directory for scripts to be able to use
Disclosure questions

AI disclosure.

  • The AI tool authored large parts of the code

Copy link
Copy Markdown
Member

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks cool! I like how this installation infra is shaping up.

Copy link
Copy Markdown
Member

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks cool! I like how this installation infra is shaping up.

executable = "tool" # required for git sources (crates.io is not consulted)
```

To install into the user's global cargo location (`~/.cargo/bin`) instead of a symposium-managed cache, set `global = true`. No `--root` is passed; `$PATH` is not augmented (the binary is expected to already be on `$PATH`).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explain when you might want that? I guess it is intended for cases where the user might want to use the CLI too?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect this to change auto-update behavior? (I think no)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants