This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1883 from sdboyer/explicit-root
dep: Allow explicitly setting the project root via an env var
- Loading branch information
Showing
6 changed files
with
124 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
id: env-vars | ||
title: Environment Variables | ||
--- | ||
|
||
dep's behavior can be modified by some environment variables: | ||
|
||
* [`DEPCACHEDIR`](#depcachedir) | ||
* [`DEPPROJECTROOT`](#depprojectroot) | ||
* [`DEPNOLOCK`](#depnolock) | ||
|
||
Environment variables are passed through to subcommands, and therefore can be used to affect vcs (e.g. `git`) behavior. | ||
|
||
--- | ||
|
||
### `DEPCACHEDIR` | ||
|
||
Allows the user to specify a custom directory for dep's [local cache](glossary.md#local-cache) of pristine VCS source repositories. Defaults to `$GOPATH/pkg/dep`. | ||
|
||
### `DEPPROJECTROOT` | ||
|
||
If set, the value of this variable will be treated as the [project root](glossary.md#project-root) of the [current project](glossary.md#current-project), superseding GOPATH-based inference. | ||
|
||
This is primarily useful if you're not using the standard `go` toolchain as a compiler (for example, with Bazel), as there otherwise isn't much use to operating outside of GOPATH. | ||
|
||
### `DEPNOLOCK` | ||
|
||
By default, dep creates an `sm.lock` file at `$DEPCACHEDIR/sm.lock` in order to | ||
prevent multiple dep processes from interacting with the [local | ||
cache](glossary.md#local-cache) simultaneously. Setting this variable will | ||
bypass that protection; no file will be created. This can be useful on certain | ||
filesystems; VirtualBox shares in particular are known to misbehave. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"docs": { | ||
"Guides": ["introduction", "installation", "new-project", "migrating", "daily-dep"], | ||
"References": ["ensure-mechanics", "failure-modes", "the-solver", "deduction", "Gopkg.toml", "Gopkg.lock", "FAQ", "glossary"] | ||
"References": ["ensure-mechanics", "failure-modes", "the-solver", "deduction", "Gopkg.toml", "Gopkg.lock", "FAQ", "env-vars", "glossary"] | ||
} | ||
} |