Skip to content

Commit 744e0ed

Browse files
Lagojaclaude
andcommitted
Lint and fix tests
- Remove unused refreshCmdForShell function (lint error) - Update process-compose version in flakeref test from v0.40.2 to v1.46.0 (old version used Go 1.19.3 which fails on newer macOS) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b704a5e commit 744e0ed

2 files changed

Lines changed: 3 additions & 18 deletions

File tree

internal/devbox/refresh.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,6 @@ func (d *Devbox) refreshCmd() string {
5252
return fmt.Sprintf(`eval "$(devbox %s)" && hash -r`, devboxCmd)
5353
}
5454

55-
func (d *Devbox) refreshCmdForShell(format string) string {
56-
devboxCmd := fmt.Sprintf("shellenv --preserve-path-stack -c %q", d.projectDir)
57-
if d.isGlobal() {
58-
devboxCmd = "global shellenv --preserve-path-stack -r --format " + format
59-
} else {
60-
devboxCmd = fmt.Sprintf("shellenv --preserve-path-stack -c %q --format %s", d.projectDir, format)
61-
}
62-
63-
if format == "nushell" {
64-
// Nushell doesn't have eval; use overlay or source with temporary file
65-
return fmt.Sprintf(`devbox %s | save -f ~/.cache/devbox-env.nu; source ~/.cache/devbox-env.nu`, devboxCmd)
66-
}
67-
return fmt.Sprintf(`eval "$(devbox %s)" && hash -r`, devboxCmd)
68-
}
69-
7055
func (d *Devbox) refreshAlias() string {
7156
if isFishShell() {
7257
return fmt.Sprintf(

testscripts/add/add_platforms_flakeref.test.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ exec devbox install
44

55
# aside: choose armv7l-linux to verify that the add actually works on the
66
# current host that is unlikely to be armv7l-linux
7-
exec devbox add github:F1bonacc1/process-compose/v0.40.2 --exclude-platform armv7l-linux
7+
exec devbox add github:F1bonacc1/process-compose/v1.46.0 --exclude-platform armv7l-linux
88
json.superset devbox.json expected_devbox1.json
99

1010
# verify that the package is installed on this platform
1111
exec devbox run -- process-compose version
12-
stdout '0.40.2'
12+
stdout '1.46.0'
1313

1414
-- devbox.json --
1515
{
@@ -24,7 +24,7 @@ stdout '0.40.2'
2424
"packages": {
2525
"hello": "",
2626
"cowsay": "latest",
27-
"github:F1bonacc1/process-compose/v0.40.2": {
27+
"github:F1bonacc1/process-compose/v1.46.0": {
2828
"excluded_platforms": ["armv7l-linux"]
2929
}
3030
}

0 commit comments

Comments
 (0)