MCPcopy Index your code
hub / github.com/jetify-com/devbox / RefreshAliasOrCommand

Method RefreshAliasOrCommand

internal/devbox/refresh.go:29–35  ·  view source on GitHub ↗

In some cases (e.g. 2 non-global projects somehow active at the same time), refresh might not match. This is a tiny edge case, so no need to make UX great, we just print out the entire command.

()

Source from the content-addressed store, hash-verified

27// refresh might not match. This is a tiny edge case, so no need to make UX
28// great, we just print out the entire command.
29func (d *Devbox) RefreshAliasOrCommand() string {
30 if !d.isRefreshAliasSet() {
31 // even if alias is not set, it might still be set by the end of this process
32 return fmt.Sprintf("`%s` or `%s`", d.refreshAliasName(), d.refreshCmd())
33 }
34 return d.refreshAliasName()
35}
36
37func (d *Devbox) refreshAliasName() string {
38 if d.isGlobal() {

Callers 2

ensureStateIsUpToDateMethod · 0.95
shellEnvFuncFunction · 0.80

Calls 3

isRefreshAliasSetMethod · 0.95
refreshAliasNameMethod · 0.95
refreshCmdMethod · 0.95

Tested by

no test coverage detected