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.
()
| 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. |
| 29 | func (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 | |
| 37 | func (d *Devbox) refreshAliasName() string { |
| 38 | if d.isGlobal() { |
no test coverage detected