@@ -18,7 +18,6 @@ import (
18
18
"github.com/alessio/shellescape"
19
19
"github.com/pkg/errors"
20
20
"go.jetpack.io/devbox/internal/boxcli/featureflag"
21
- "go.jetpack.io/devbox/internal/boxcli/usererr"
22
21
"go.jetpack.io/devbox/internal/debug"
23
22
"go.jetpack.io/devbox/internal/nix"
24
23
"go.jetpack.io/devbox/internal/planner/plansdk"
@@ -64,9 +63,6 @@ type DevboxShell struct {
64
63
// UserInitHook contains commands that will run at shell startup.
65
64
UserInitHook string
66
65
67
- ScriptName string
68
- ScriptCommand string
69
-
70
66
// profileDir is the absolute path to the directory storing the nix-profile
71
67
profileDir string
72
68
historyFile string
@@ -289,17 +285,10 @@ func (s *DevboxShell) Run() error {
289
285
// This could be from one of the generated shellrc commands, but more likely is from
290
286
// a user's command or script. So, we want to return nil for this.
291
287
if exitErr := (& exec.ExitError {}); errors .As (err , & exitErr ) {
292
-
293
- // The exception to the previous comment is if we are executing a shell script
294
- // via `devbox run` or the deprecated `devbox shell -- <command>`. In this case,
295
- // we do want to return the exit code of the script that was run.
296
- if s .ScriptCommand != "" {
297
- return usererr .NewExecError (err )
298
- }
299
288
return nil
300
289
}
301
290
302
- // This means that there was a error from devbox's code or nix's code. Not a user
291
+ // This means that there was an error from devbox's code or nix's code. Not a user
303
292
// error and so we do return it.
304
293
return errors .WithStack (err )
305
294
}
@@ -354,11 +343,6 @@ func (s *DevboxShell) writeDevboxShellrc() (path string, err error) {
354
343
}
355
344
}()
356
345
357
- pathPrepend := s .profileDir + "/bin"
358
- if s .pkgConfigDir != "" {
359
- pathPrepend = s .pkgConfigDir + ":" + pathPrepend
360
- }
361
-
362
346
tmpl := shellrcTmpl
363
347
if s .name == shFish {
364
348
tmpl = fishrcTmpl
@@ -370,8 +354,6 @@ func (s *DevboxShell) writeDevboxShellrc() (path string, err error) {
370
354
OriginalInitPath string
371
355
UserHook string
372
356
PluginInitHook string
373
- PathPrepend string
374
- ScriptCommand string
375
357
ShellStartTime string
376
358
HistoryFile string
377
359
ExportEnv string
@@ -381,8 +363,6 @@ func (s *DevboxShell) writeDevboxShellrc() (path string, err error) {
381
363
OriginalInitPath : s .userShellrcPath ,
382
364
UserHook : strings .TrimSpace (s .UserInitHook ),
383
365
PluginInitHook : strings .TrimSpace (s .pluginInitHook ),
384
- PathPrepend : pathPrepend ,
385
- ScriptCommand : strings .TrimSpace (s .ScriptCommand ),
386
366
ShellStartTime : s .shellStartTime ,
387
367
HistoryFile : strings .TrimSpace (s .historyFile ),
388
368
ExportEnv : exportify (s .env ),
0 commit comments