Skip to content

Commit 70964d8

Browse files
authored
Evaluate environment variables in the local plugin path (#2639)
## Summary Fixes #2638 See issue for description of the problem. This PR is just a one-line change to evaluate current environment variables as devbox assembles the path for local plugins. This will allow things like a dynamic root directory for plugin source. ## How was it tested? Built devbox locally with code change and copied it to /usr/local/bin/devbox. Refreshed global environment and plugins defined with an environment variable in the path now resolve properly. ## Community Contribution License All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request, I represent that I have the right to license the contributions to the project maintainers under the Apache 2 License as stated in the [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
1 parent 86c1c3a commit 70964d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/plugin/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (l *LocalPlugin) LockfileKey() string {
5555
}
5656

5757
func (l *LocalPlugin) Path() string {
58-
path := l.ref.Path
58+
path := os.ExpandEnv(l.ref.Path)
5959
if !strings.HasSuffix(path, pluginConfigName) {
6060
path = filepath.Join(path, pluginConfigName)
6161
}

0 commit comments

Comments
 (0)