Skip to content

Commit 2c6bdd8

Browse files
authored
impl: remove profileDir from shell (#1583)
I noticed this wasn't being used anywhere.
1 parent dfd5d53 commit 2c6bdd8

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

internal/impl/devbox.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,6 @@ func (d *Devbox) Shell(ctx context.Context) error {
169169
ctx, task := trace.NewTask(ctx, "devboxShell")
170170
defer task.End()
171171

172-
profileDir, err := d.profilePath()
173-
if err != nil {
174-
return err
175-
}
176-
177172
envs, err := d.ensurePackagesAreInstalledAndComputeEnv(ctx)
178173
if err != nil {
179174
return err
@@ -193,7 +188,6 @@ func (d *Devbox) Shell(ctx context.Context) error {
193188

194189
opts := []ShellOption{
195190
WithHooksFilePath(shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename)),
196-
WithProfile(profileDir),
197191
WithHistoryFile(filepath.Join(d.projectDir, shellHistoryFile)),
198192
WithProjectDir(d.projectDir),
199193
WithEnvVariables(envs),

internal/impl/shell.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ type DevboxShell struct {
5959
userShellrcPath string
6060

6161
hooksFilePath string
62-
63-
// profileDir is the absolute path to the directory storing the nix-profile
64-
profileDir string
65-
historyFile string
62+
historyFile string
6663

6764
// shellStartTime is the unix timestamp for when the command was invoked
6865
shellStartTime time.Time
@@ -174,12 +171,6 @@ func initShellBinaryFields(path string) *DevboxShell {
174171
return shell
175172
}
176173

177-
func WithProfile(profileDir string) ShellOption {
178-
return func(s *DevboxShell) {
179-
s.profileDir = profileDir
180-
}
181-
}
182-
183174
func WithHistoryFile(historyFile string) ShellOption {
184175
return func(s *DevboxShell) {
185176
s.historyFile = historyFile

internal/impl/shell_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ func testWriteDevboxShellrc(t *testing.T, testdirs []string) {
6969
projectDir: "path/to/projectDir",
7070
userShellrcPath: test.shellrcPath,
7171
hooksFilePath: test.hooksFilePath,
72-
profileDir: "./.devbox/profile",
7372
}
7473
gotPath, err := s.writeDevboxShellrc()
7574
if err != nil {

0 commit comments

Comments
 (0)