Skip to content

Commit

Permalink
cmd/incus: Add INCUS_PROJECT env variable
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Sep 19, 2023
1 parent b6d66f0 commit bee0e2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/incus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ func (c *cmdGlobal) PreRun(cmd *cobra.Command, args []string) error {
// Override the project
if c.flagProject != "" {
c.conf.ProjectOverride = c.flagProject
} else {
c.conf.ProjectOverride = os.Getenv("INCUS_PROJECT")
}

// Setup password helper
Expand Down
3 changes: 2 additions & 1 deletion doc/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Name | Description
`INCUS_CONF` | Path to the client configuration directory
`INCUS_GLOBAL_CONF` | Path to the global client configuration directory
`INCUS_REMOTE` | Name of the remote to use (overrides configured default remote)
`INCUS_PROJECT` | Name of the project to use (overrides configured default project)

## Server environment variable

Expand All @@ -36,4 +37,4 @@ Name | Description
`INCUS_OVMF_PATH` | Path to an OVMF build including `OVMF_CODE.fd` and `OVMF_VARS.ms.fd`
`INCUS_SECURITY_APPARMOR` | If set to `false`, forces AppArmor off
`INCUS_SHIFTFS_DISABLE` | Disable `shiftfs` support (useful when testing traditional UID shifting)
`INCUS_UI` | Path to the web UI to serve through the web server
`INCUS_UI` | Path to the web UI to serve through the web server

0 comments on commit bee0e2c

Please sign in to comment.